Context
Organisation prior Delta
An organisation that already had declared custom marketing sources for its campaigns can continue to do so in Configurations > Custom marketing campaigns > Sources. These rules will be taken into account in the Analytics Suite 2 and the next day in Analytics Suite Delta.
Organisation since Delta
An organisation that never had declared a custom marketing source and not allowed to access Configurations (only available to former customers), can identify a campaign and a custom source based on the process described below.
Tagging version
A site using SmartTag 5.29.2 or furtther is not concerned by this article process.With tagging only, and no Data Management configuration, you can identify a custom source.
You can find dedicated tagging recommendations in our developper documentation.
Collection
Tagging
With a recent tag (minimum 5.17), you can identify the custom marketing source with a tagging like this:
https://www.mysite.com/?at_medium=custom1&at_campaign=testcampaign&at_custom1=var_1&at_custom2=var_2&at_custom3=var_3&at_custom4=var_4
Note
at_campaign does not require an id, you can use this format &at_campaign=[testcampaign].
More information on campaign tagging here.
Hit
The generated hit will contain the campaign parameters in this format:
xto=cs1-[testcampaign]-[var_1]-[var_2]-[var_3]-[var_4]
Tag parameters
Campaign information is associated to tag parameters that can be used in Data Management.
Our previous example will feed the following tag parameters:
Tag parameter | Associated value |
src_code | "CS1" |
src_campaign | "testcampaign" |
src_custom_var1 | "var_1" |
src_custom_var2 | "var_2" |
src_custom_var3 | "var_3" |
src_custom_var4 | "var_4" |
Property mapping
Match table
To facilitate the handling of your multiple custom marketing sources, please declare a match table in Data Management > Configuration > Match table.
Make sure that this table has the src_code value set as a key and the label that you want to be displayed in your analysis as a value.
Example
Key : CS1
Value : MyCustomMarketingSourceName1
To take your custom marketing source and campaign into account, please edit the rules of the following properties:
Campaign - Medium (src_medium)
Block 1
- IF the Tag parameter src_code (string) starts with "CS" (non case-sensitive)
- THEN the value of the property is defined with the value of the src_code Tag parameter
- ACTION Replace the value with a match table (the one created earlier)
If the key doesn't have a matching value you can leave the src_code value or not.
Block 2
- IF Tag parameter src_medium is not empty
- THEN the property is defined by the value associated to the tag parameter src_medium
Block 3
- The value of the property is emptied
Note
The edition of the src_medium property, will also be taken into account into the src property which is partly based on the src_medium.
Campaign - Name (src_campaign)
Block 1
- IF Tag parameter src_campaign is not empty
- THEN the property is defined by the value associated to the tag parameter src_campaign
Block 2
- The value of the property is emptied
Note
If your campaign tagging is based on an integer instead of a string ex at_campaign=12 the rule needs to be edited.
The src_campaign_id integer tag parameter will be filled but you will not have a src_campaign tag parameter.
So you can add a block to your rule with the following setup
Block 2
- IF Tag parameter src_campaign_id type integer is equal to 12
- THEN the value of the property is defined by the custom label "MyCampaignLabel12"
If you had several campaigns tagged with only id and not labels, you can also rely on a matching table to make it easier.
Campaign's X variable
For each campaign variable that you need to rely on, you will have to create a dedicated property. To associate the value of the property to all events of the visit, please prefix the property.key by src_(i.e.: src_myvariablepropertyx).
In the rule of each property please make sure to add a block like this one prior all other blocks:
- IF Tag parameter src_code is equal to CS1
- AND IF Tag parameter src_myvariablepropertyx is not empty
- THEN the property value is defined by the value of the tag parameter src_myvariablepropertyx