Security, Privacy, AI and CSR information for all Piano products now lives in one place. Explore our Compliance Center.
Analytics
English French
English French

Why are my at_medium source types not translated?

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

at_medium=sl

xto=SEC

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

at_medium=sl

src_medium=sl

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

at_medium=sl

at_medium=Sponsored%20links

at_medium=display

at_medium=Advertisement

at_medium=email

at_medium=Email%20marketing

at_medium=affiliate

at_medium=Affiliation%20and%20partners

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.

  1. 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

Email marketing

affiliate

Affiliation and partners

  1. In Data Management > Property > src_medium > Processing, edit your rule and add a first TAG FIRST PRINCIPLE condition block:

    • If: the tag parameter src_medium of type string is not empty.

    • Then: the property is set with the value of the tag parameter src_medium of type string.

  2. Add an action: Replace > Match table.

  3. Select the match table "Sources types".

  4. 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.

  5. Save and deploy your rule.

Last updated: