Skip to main content
Skip table of contents

Managing Sources on Piano Analytics

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.

Description

If you're using “at_medium” v2 campaign tagging and an implementation that combines some information tagged as “AS2 Tagging” with other information tagged as “Piano Analytics Tagging”, you may have non-translated source types.

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

SmartTag will extract the value of the at_medium to convert it into the hit.

When using SmartTag, the campaign benefits from a conversion into xto/xtor parameters in the hit so that the campaign can be translated and processed correctly in Piano Analytics.

Tagging

Hit

Result

at_medium=sl

xto=SEC

Sponsored links

When using an event-based tagging, the hit sends directly the values of the at_medium to allow more flexibility in sources management.

Tagging

Hit

Result

at_medium=sl

src_medium=sl

sl

Solution

To find the matching values on an event based tagging you may rely on two options:

1. Edit the campaign tagging

If you are using an event based tagging (this solution doesn't feed data in AS2), you will only have to edit the values to return the final values directly.
Example :

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

2. Edit the src_medium rule

In Data Management, you can change the src_medium property_rule so that it converts the tagging values into displayable values.

Setp 1:

In Data Management > Configurations > Match tables, create a new match table labeled "Sources types".
You do not need to activate case-sensitivity.
Add the following values:

key

values

sl

Sponsored%20links

display

Advertisement

email

Email%20marketing

affiliate

Affiliation%20and%20partners

Step 2:

In Data Management > Property > src_medium > Processing, edit your rule to add a first TAG FIRST PRINCIPLE condition block just like this:
IF tag parameter src_medium type string is not empty
THEN the property is set with the value of the tag parameter src_medium type string
Add an action > Replace > Match table.
Select the match table "Sources types".
Tick the checkbox "If the key has no matching value, the initial value of the key is kept" to keep other types of sources.
Save and deploy your rule.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.