Marketing campaigns can be tracked with Piano thanks to specific tagging. This article aims to clarify the tracking possibilities offered by Piano to track marketing campaigns.
Prerequisite
In order for a marketing campaign to be taken into account in Piano Analytics, you need to feed at least the src_medium (Source and Campaign - Type) and src_campaign (Campaign - Name) properties.
Marketing campaign tagging
SDK Piano Analytics
As explained in the Piano Analytics SDK technical documentation, any URL parameter prefixed with at_ will be interpreted as a campaign parameter, and transformed by the SDK into a src_ property within events.
For example, with the following URL
https://www.site.com/?at_medium=MySource&at_campaign=MyCampaign&at_myproperty=MyValue&at_myotherproperty=MyOtherValue
You'll find the following property/value pairs in your events:
- src_medium = MySource
- src_campaign = MyCampaign
- src_myproperty = MyValue
- src_myotherproperty = MyOtherValue
Caution, you will need to declare the custom parameters (here, src_myproperty and src_myotherproperty) within your Data Model, and the prefix "src_" is required.
In the case of mobile applications, you'll need to feed the properties (starting with src_) yourself from the markup, as in this code example.
SmartTag
There are two versions of the tracking to tag marketing campaigns. We advise you to have a SmartTag version higher than 5.17.0 to use the most recent campaign model, as the Piano Analytics SDK does not interpret the older version of our campaigns, which would force you to rework your links the day you would update your site's tagging.
The technical documentation for tracking these campaigns is divided into two parts: native campaign settings, and fully customized campaigns.
Native settings
In the case of native campaign settings, you'll find parameters specific to each type of campaign. These parameters are automatically translated into the right format in the hits, thanks to the value entered in at_medium.
For example, with the following link
https://www.site.com/?at_medium=MySource&at_campaign=MyCampaign&at_myproperty=MyValue&at_myotherproperty=MyOtherValue
The value of at_medium (sl) is automatically recognized by the SmartTag, which will format the campaign information correctly in the hit, such as:
xto = sec-[MyCampaign]-goo
Processing rules native to the src_medium property (which retrieves the value pushed into at_medium) also enable this translation, should you push the campaign information yourself from the tag:
Full-custom campaigns
It's also possible to push a completely customized campaign, i.e. with the value of your choice within at_medium and additional URL parameters. All you need to do is having a SmartTag version 5.29.0 or higher, and to put the values of your choice in each parameter.
For example, with the following URL
https://www.site.com/?at_medium=MySource&at_campaign=MyCampaign&at_myproperty=MyValue&at_myotherproperty=MyOtherValue
You'll find the following property/value pairs in your events:
- src_medium = MySource
- src_campaign = MyCampaign
- src_myproperty = MyValue
- src_myotherproperty = MyOtherValue
Caution, you will need to declare the custom parameters (src_myproperty and src_myotherproperty) within your Data Model, and the prefix "src_" is required.