Skip to main content

Migrate from SmartTag

This guide outlines the process of transitioning from legacy SmartTag SDKs to the modern Piano Analytics SDKs, detailing differences in tagging methodologies, SDK lifecycles, and migration strategies.

SDK and Tagging landscape

SDKs landscape

Since 2015, SmartTag SDKs SDKs have been implemented using two primary tagging approaches:

  • AS2 Tagging (2015) - Designed for the Analytics Suite 2, utilizing methods like tag.page.set() and tag.page.dispatch().​
  • PA Tagging (Winter 2020) - Introduced to align with the Piano Analytics event-based model, employing tag.event.send() for event tracking.​

As of April 2022, Piano Analytics SDKs are the standard for data collection, offering a streamlined, event-centric architecture. Support for SmartTag SDKs ceased in April 2023, with no further maintenance or feature updates.

Before I start

attention

"xtor" marketing campaigns syntax will not be recognized anymore. Please use "at_" instead.

Marketing Campaigns Migration

SmartTag

Smarttag previously relied on campaigns that had to be declared before it could be used. This configuration step, in addition to using predefined campaign types, allowed values sent in the URL to be transformed.

So for example, the xtor=AL was automatically transformed into the Campaign Type "Affiliation and partners".

The ID of the campaign was then matched to its declared label in the configuration panel.

tip

Learn more on the dedicated migration page for marketing campaigns

Piano Analytics SDK

With the Piano Analytics SDK, the tag first approach is used instead, no matching is done and the data you send is the data you will later find in the different exploratory tools, without any need for prior configuration.

note

When sending #xtor=SEC-2-GOO, the GOO part was automatically translated to Google Adwords. When using the Piano Analytics SDK, src_sl_platform=GOO will no longer translate the value. If you need consistency when migrating, please use Google Adwords as the value instead.

This tag first approach makes tracking marketing sources much more flexible, but it remains important to understand its core functioning for a proper migration from the Smarttag SDK.

Piano Analytics uses the Data Model to populate data into their respective properties, it also uses the at_* marketing campaign format.

info

This at_* used for your different properties is going to be transformed into src_* by the tag directly.

  1. When sending at_type=gold, you will populate the property Campaign/Organic, if you want to populate the Emailing/Affiliation/Campaign type, then please use the associated property in the data model.
  2. When sending at_medium=affiliate & at_aff_type=gold. Will result in having src_medium=affiliate & src_aff_type=gold in the tag. Then using the data model you can see which property you'll have to use to find your data.

Difference between tagging philosophies / SDKs

The functionalities of our SDKs have followed the evolution of our audience measurement solution.

Perfectly adapted to our legacy system, the SmartTag SDKs had to be adapted to the new Piano Analytics solution to allow you to send events and use your Data Model.

This is what was enabled with the PA Tagging philosophy during winter 2020, while still using the old SmartTag SDKs.

We then decided to start from scratch and redesign brand new SDKs that are based on our new Piano Analytics solution and event-based data model:

SmartTag (AS2 Tagging) SmartTag (PA Tagging) Piano Analytics SDKs
tag.page.set({
name: "My_page",
level2: "sub_level",
});
tag.setprops({
"d:article_date": 1646925124,
"b:article_premium": false,
});
tag.page.dispatch();
tag.event.send('page.display', {
'page': 'My page'
'site_level2': 'sub level' ,
'article_date': 1646925124,
'article_premium': false
});
pa.sendEvent('page.display', {
'page': 'My page'
'site_level2': 'sub level' ,
'article_date': 1646925124,
'article_premium': false
});

As you can see here, if you already tagged your perimeters with the SmartTag (PA Tagging) approach, migrating to Piano Analytics SDKs will not be heavy.

It is the same event-based approach, with easier tagging methods and configurations.

If you are currently using the SmartTag (AS2 Tagging) approach, no pressure! You have one year to migrate. But we know that implementation projects take time, so we encourage you to start playing with the new SDKs soon to get the latest feature.

Piano Analytics SDKs come with:

  • A redesigned and easier tagging
  • A JS Browserless SDK to collect data in new environments
  • A new "Privacy by design" approach, the most advanced on the market
  • Dozens of improvements and new features

Can I use both SDKs?

You can.

But both SDKs don't communicate, so Privacy configuration and users' ID are not shared.

More information in the dedicated article.

Complete tagging example

SmartTag - AS2 Tagging (2015)

documentation

<html>
<head>
<title>My Page</title>
<script src="https://tag.aticdn.net/smarttag.js"></script>
</head>
<body>
...
<script type="text/javascript">
var tag = new ATInternet.Tracker.Tag({
site: 123456789,
collectDomain: "https://<xxxxxxx>.pa-cd.com",
});

tag.page.set({
name: "My_page",
level2: "sub_level",
});
tag.setprops({
"d:article_publication_date": 1646925124,
"b:article_premium": false,
});
tag.dispatch();
</script>
</body>
</html>

SmartTag - PA Tagging (Winter 2020)

documentation

<html>
<head>
<title>My Page</title>
<script src="https://tag.aticdn.net/smarttag.js"></script>
</head>
<body>
...
<script type="text/javascript">
var tag = new ATInternet.Tracker.Tag({
site: 123456789,
collectDomain: "https://<xxxxxxx>.pa-cd.com",
});

tag.event.send("page.display", {
page: "My page",
site_level2: "sub level",
article_date: 1646925124,
article_premium: false,
});
</script>
</body>
</html>

Piano Analytics SDKs (April 2022)

<html>
<head>
<title>My Page</title>
<script
type="text/javascript"
crossorigin="anonymous"
src="https://tag.aticdn.net/piano-analytics.js"
></script>
<script type="text/javascript">
pa.setConfigurations({
// Basic configuration to send events
site: 123456789,
collectDomain: "https://<xxxxxxx>.pa-cd.com",
});
</script>
</head>
<body>
...
<script type="text/javascript">
pa.sendEvent("page.display", {
// Event name
page: "My page",
site_level2: "sub level",
article_date: 1646925124,
article_premium: false,
});
</script>
</body>
</html>