This article only concerns customers who want to keep using predefined marketing sources as offered in the legacy version of Piano Analytics using a mix of SDKs including SmartTag and the new Piano Analytics SDK.
Your source types are not translated when your implementation mixes SmartTag (AS2 tagging) with event-based tagging (Piano Analytics SDK) and you use at_medium v2 campaign tagging. SmartTag converts the at_medium value into a code that Piano Analytics translates, but event-based tagging sends the raw value, so you see "sl" instead of "Sponsored links". To fix it, either change the values in your tagging, or change the src_medium rule in Data Management.
Why the values differ
Take this link as an example:
https://www.site.com/?at_medium=sl&at_campaign=12&at_platform=google&at_creation=my_adgroup&at_variant=my_variant&at_network=search&at_term=my_term
With SmartTag (AS2 tagging), SmartTag reads the value of at_medium and converts the campaign into xto and xtor parameters in the hit. Piano Analytics can then translate and process the campaign correctly.
|
Tagging |
Hit |
Result |
|---|---|---|
|
|
|
Sponsored links |
With event-based tagging (Piano Analytics tagging), the hit sends the value of at_medium directly, which gives you more flexibility in managing sources. Nothing translates it, so it stays as you typed it.
|
Tagging |
Hit |
Result |
|---|---|---|
|
|
|
sl |
Edit the campaign tagging
Use this solution if you only use event-based tagging. Change the at_medium values in your links so that they return the final values directly:
|
Former tagging |
New tagging |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Edit the src_medium rule
If you don't want to change your links, you can have Data Management convert the tagging values into displayable values.
-
In Data Management > Configurations > Match tables, create a match table labeled "Sources types". You don't need to activate case-sensitivity. Add these values:
|
Key |
Value |
|---|---|
|
sl |
Sponsored links |
|
display |
Advertisement |
|
|
Email marketing |
|
affiliate |
Affiliation and partners |
-
In Data Management > Property > src_medium > Processing, edit your rule and add a first TAG FIRST PRINCIPLE condition block:
-
If: the tag parameter
src_mediumof type string is not empty. -
Then: the property is set with the value of the tag parameter
src_mediumof type string.
-
-
Add an action: Replace > Match table.
-
Select the match table "Sources types".
-
Select the checkbox "If the key has no matching value, the initial value of the key is kept", so other types of sources stay as they are.
-
Save and deploy your rule.