This article presents several use cases for VersaTag, along with code samples in the VersaTag itself. For these use cases, consider the following scenario:
Advertiser:myBestCheapFlight
Website:myBestCheapFlight.com
Site pages:
myBestCheapFlight.com
myBestCheapFlight.com/newsletter
myBestCheapFlight.com/blog
myBestCheapFlight.com/checkout
Use Case 1
The advertiser wants to trigger a checkout conversion tag and collect data when the user purchases a ticket (conversion). The data includes purchase ID, amount, gender, from, and to.
Purchase ID and amount are part of the sales tokens that, if selected, will be added automatically to the code in the activityParams section.
Gender, from and to are additions to the activityParams. If the user mapped the tag purchase to a mapping rule, it will also be added to the activityParams section.
Code Sample
<script>
// INSTRUCTIONS
// The VersaTag code should be placed at the top of the <BODY> section of the HTML page.
// To ensure that the full page loads as a prerequisite for the VersaTag
// being activated (and the working mode is set to synchronous mode), place the tag at the bottom of the page. Note, however, that this may
// skew the data for slow-loading pages, and in general is not recommended.
// If the VersaTag code is configured to run in async mode, place the tag at the bottom of the page before the end of the <BODY > section.
//
// NOTE: You can test if the tags are working correctly before the campaign launches
// as follows: Browse to http://bs.serving-sys.com/BurstingPipe/adServer.bs?cn=at, which is
// a page that lets you set your local machine to 'testing' mode. In this mode, when
// visiting a page that includes a VersaTag, a new window will open, showing you
// the tags activated by the VersaTag and the data sent by the VersaTag tag to the Sizmek servers.
//
// END of instructions (These instruction lines can be deleted from the actual HTML)
var versaTag = {};
versaTag.id = "5467";
versaTag.sync = 0;
versaTag.dispType = "js";
versaTag.ptcl = "HTTPS";
versaTag.bsUrl = "bs.serving-sys.com/BurstingPipe";
// VersaTag activity parameters include all conversion parameters including custom parameters and Predefined parameters. Syntax: "ParamName1":"ParamValue1", "ParamName2":"ParamValue2". ParamValue can be empty.
versaTag.activityParams = {
"OrderID":"",
"Session":"",
"Value":"",
"productid":"",
"productinfo":"",
"Quantity":"", //added automatically to the generated codewhen selecting the “sales token” checkbox – should be populated with the values from the purchase
“gender”:””,
“from”:””,
“to”:”” // added automatically to the generated code when the conversion tag “purchase” that includes these params
};
// Static retargeting tags parameters. Syntax: "TagID1":"ParamValue1", "TagID2":"ParamValue2". ParamValue can be empty.
versaTag.retargetParams = {
“32145”:”” // added automatically to the generated code if “userLanguage” retargeting tag is mapped to a mapping rule note that the value here should be the value’s ID that comes from the static //retatgeting tag (i.e 1-9,a-Z)
};
// Dynamic retargeting tags parameters. Syntax: "TagID1":"ParamValue1", "TagID2":"ParamValue2". ParamValue can be empty.
versaTag.dynamicRetargetParams = {
“66647”: “”// added automatically to the generated code if “destinationSearch” retargeting tag is mapped to a mapping rule note that the value here should be the value that is defined on the dynamic retargeting tag
};
// Third party tags conditional parameters and mapping rule parameters. Syntax: "CondParam1":"ParamValue1", "CondParam2":"ParamValue2". ParamValue can be empty.
versaTag.conditionalParams = {
“seatType”: “”// added automatically to the generated code if “seatType” param is added to the paramaters mapping rule criteria
};
</script>
<script id="ebOneTagUrlId" src="https://secure-ds.serving-sys.com/SemiCachedScripts/ebOneTag.js"></script>
<noscript>
<iframe src="https://bs.serving-sys.com/BurstingPipe?cn=ot&onetagid=5467&ns=1&activityValues=$$&
retargetingValues=$$$$&dynamicRetargetingValues=$$$$&acp=$$$$&"
style="display:none;width:0px;height:0px"> </iframe>
</noscript>
Use Case 2
The advertiser wants to trigger a static retargeting tag called userLanguage (ID is 32145). This action marks the user with a cookie that refers to the user's location. In the future, the user can be targeted with an appropriate ad according the user's language.
Click to see code sample
<script>
// INSTRUCTIONS
// The VersaTag code should be placed at the top of the <BODY> section of the HTML page.
// To ensure that the full page loads as a prerequisite for the VersaTag
// being activated (and the working mode is set to synchronous mode), place the tag at the bottom of the page. Note, however, that this may
// skew the data for slow-loading pages, and in general is not recommended.
// If the VersaTag code is configured to run in async mode, place the tag at the bottom of the page before the end of the <BODY > section.
//
// NOTE: You can test if the tags are working correctly before the campaign launches
// as follows: Browse to http://bs.serving-sys.com/BurstingPipe/adServer.bs?cn=at, which is
// a page that lets you set your local machine to 'testing' mode. In this mode, when
// visiting a page that includes a VersaTag, a new window will open, showing you
// the tags activated by the VersaTag and the data sent by the VersaTag tag to the Sizmek servers.
//
// END of instructions (These instruction lines can be deleted from the actual HTML)
var versaTag = {};
versaTag.id = "5467";
versaTag.sync = 0;
versaTag.dispType = "js";
versaTag.ptcl = "HTTPS";
versaTag.bsUrl = "bs.serving-sys.com/BurstingPipe";
// VersaTag activity parameters include all conversion parameters including custom parameters and Predefined parameters. Syntax: "ParamName1":"ParamValue1", "ParamName2":"ParamValue2". ParamValue can be empty.
versaTag.activityParams = {
"OrderID":"",
"Session":"",
"Value":"",
"productid":"",
"productinfo":"",
"Quantity":"", //added automatically to the generated codewhen selecting the “sales token” checkbox – should be populated with the values from the purchase
“gender”:””,
“from”:””,
“to”:”” // added automatically to the generated code when the conversion tag “purchase” that includes these params
};
// Static retargeting tags parameters. Syntax: "TagID1":"ParamValue1", "TagID2":"ParamValue2". ParamValue can be empty.
versaTag.retargetParams = {
“32145”:”” // added automatically to the generated code if “userLanguage” retargeting tag is mapped to a mapping rule note that the value here should be the value’s ID that comes from the static //retatgeting tag (i.e 1-9,a-Z)
};
// Dynamic retargeting tags parameters. Syntax: "TagID1":"ParamValue1", "TagID2":"ParamValue2". ParamValue can be empty.
versaTag.dynamicRetargetParams = {
“66647”: “”// added automatically to the generated code if “destinationSearch” retargeting tag is mapped to a mapping rule note that the value here should be the value that is defined on the dynamic retargeting tag
};
// Third party tags conditional parameters and mapping rule parameters. Syntax: "CondParam1":"ParamValue1", "CondParam2":"ParamValue2". ParamValue can be empty.
versaTag.conditionalParams = {
“seatType”: “”// added automatically to the generated code if “seatType” param is added to the paramaters mapping rule criteria
};
</script>
<script id="ebOneTagUrlId" src="https://secure-ds.serving-sys.com/SemiCachedScripts/ebOneTag.js"></script>
<noscript>
<iframe src="https://bs.serving-sys.com/BurstingPipe?cn=ot&onetagid=5467&ns=1&activityValues=$$&
retargetingValues=$$$$&dynamicRetargetingValues=$$$$&acp=$$$$&"
style="display:none;width:0px;height:0px"> </iframe>
</noscript>
Use Case 3
The advertiser wants to trigger a dynamic retargeting tag destinationSearch (ID is 66647). This action marks the user with a cookie that refers to the destination of the flight. In the future, the user can be targeted with an appropriate ad.
Click to see code sample
<script>
// INSTRUCTIONS
// The VersaTag code should be placed at the top of the <BODY> section of the HTML page.
// To ensure that the full page loads as a prerequisite for the VersaTag
// being activated (and the working mode is set to synchronous mode), place the tag at the bottom of the page. Note, however, that this may
// skew the data for slow-loading pages, and in general is not recommended.
// If the VersaTag code is configured to run in async mode, place the tag at the bottom of the page before the end of the <BODY > section.
//
// NOTE: You can test if the tags are working correctly before the campaign launches
// as follows: Browse to http://bs.serving-sys.com/BurstingPipe/adServer.bs?cn=at, which is
// a page that lets you set your local machine to 'testing' mode. In this mode, when
// visiting a page that includes a VersaTag, a new window will open, showing you
// the tags activated by the VersaTag and the data sent by the VersaTag tag to the Sizmek servers.
//
// END of instructions (These instruction lines can be deleted from the actual HTML)
var versaTag = {};
versaTag.id = "5467";
versaTag.sync = 0;
versaTag.dispType = "js";
versaTag.ptcl = "HTTPS";
versaTag.bsUrl = "bs.serving-sys.com/BurstingPipe";
// VersaTag activity parameters include all conversion parameters including custom parameters and Predefined parameters. Syntax: "ParamName1":"ParamValue1", "ParamName2":"ParamValue2". ParamValue can be empty.
versaTag.activityParams = {
"OrderID":"",
"Session":"",
"Value":"",
"productid":"",
"productinfo":"",
"Quantity":"", //added automatically to the generated codewhen selecting the “sales token” checkbox – should be populated with the values from the purchase
“gender”:””,
“from”:””,
“to”:”” // added automatically to the generated code when the conversion tag “purchase” that includes these params
};
// Static retargeting tags parameters. Syntax: "TagID1":"ParamValue1", "TagID2":"ParamValue2". ParamValue can be empty.
versaTag.retargetParams = {
“32145”:”” // added automatically to the generated code if “userLanguage” retargeting tag is mapped to a mapping rule note that the value here should be the value’s ID that comes from the static //retatgeting tag (i.e 1-9,a-Z)
};
// Dynamic retargeting tags parameters. Syntax: "TagID1":"ParamValue1", "TagID2":"ParamValue2". ParamValue can be empty.
versaTag.dynamicRetargetParams = {
“66647”: “”// added automatically to the generated code if “destinationSearch” retargeting tag is mapped to a mapping rule note that the value here should be the value that is defined on the dynamic retargeting tag
};
// Third party tags conditional parameters and mapping rule parameters. Syntax: "CondParam1":"ParamValue1", "CondParam2":"ParamValue2". ParamValue can be empty.
versaTag.conditionalParams = {
“seatType”: “”// added automatically to the generated code if “seatType” param is added to the paramaters mapping rule criteria
};
</script>
<script id="ebOneTagUrlId" src="https://secure-ds.serving-sys.com/SemiCachedScripts/ebOneTag.js"></script>
<noscript>
<iframe src="https://bs.serving-sys.com/BurstingPipe?cn=ot&onetagid=5467&ns=1&activityValues=$$&
retargetingValues=$$$$&dynamicRetargetingValues=$$$$&acp=$$$$&"
style="display:none;width:0px;height:0px"> </iframe>
</noscript>
Use Case 4
The advertiser wants to trigger the conversion tag businessClassBooking only if the user selected a business class seat. The mapping rule will contain a parameter called seatType and its value will be seatType = “business”.
Click to see code sample
<script>
// INSTRUCTIONS
// The VersaTag code should be placed at the top of the <BODY> section of the HTML page.
// To ensure that the full page loads as a prerequisite for the VersaTag
// being activated (and the working mode is set to synchronous mode), place the tag at the bottom of the page. Note, however, that this may
// skew the data for slow-loading pages, and in general is not recommended.
// If the VersaTag code is configured to run in async mode, place the tag at the bottom of the page before the end of the <BODY > section.
//
// NOTE: You can test if the tags are working correctly before the campaign launches
// as follows: Browse to http://bs.serving-sys.com/BurstingPipe/adServer.bs?cn=at, which is
// a page that lets you set your local machine to 'testing' mode. In this mode, when
// visiting a page that includes a VersaTag, a new window will open, showing you
// the tags activated by the VersaTag and the data sent by the VersaTag tag to the Sizmek servers.
//
// END of instructions (These instruction lines can be deleted from the actual HTML)
var versaTag = {};
versaTag.id = "5467";
versaTag.sync = 0;
versaTag.dispType = "js";
versaTag.ptcl = "HTTPS";
versaTag.bsUrl = "bs.serving-sys.com/BurstingPipe";
// VersaTag activity parameters include all conversion parameters including custom parameters and Predefined parameters. Syntax: "ParamName1":"ParamValue1", "ParamName2":"ParamValue2". ParamValue can be empty.
versaTag.activityParams = {
"OrderID":"",
"Session":"",
"Value":"",
"productid":"",
"productinfo":"",
"Quantity":"", //added automatically to the generated codewhen selecting the “sales token” checkbox – should be populated with the values from the purchase
“gender”:””,
“from”:””,
“to”:”” // added automatically to the generated code when the conversion tag “purchase” that includes these params
};
// Static retargeting tags parameters. Syntax: "TagID1":"ParamValue1", "TagID2":"ParamValue2". ParamValue can be empty.
versaTag.retargetParams = {
“32145”:”” // added automatically to the generated code if “userLanguage” retargeting tag is mapped to a mapping rule note that the value here should be the value’s ID that comes from the static //retatgeting tag (i.e 1-9,a-Z)
};
// Dynamic retargeting tags parameters. Syntax: "TagID1":"ParamValue1", "TagID2":"ParamValue2". ParamValue can be empty.
versaTag.dynamicRetargetParams = {
“66647”: “”// added automatically to the generated code if “destinationSearch” retargeting tag is mapped to a mapping rule note that the value here should be the value that is defined on the dynamic retargeting tag
};
// Third party tags conditional parameters and mapping rule parameters. Syntax: "CondParam1":"ParamValue1", "CondParam2":"ParamValue2". ParamValue can be empty.
versaTag.conditionalParams = {
“seatType”: “”// added automatically to the generated code if “seatType” param is added to the paramaters mapping rule criteria
};
</script>
<script id="ebOneTagUrlId" src="https://secure-ds.serving-sys.com/SemiCachedScripts/ebOneTag.js"></script>
<noscript>
<iframe src="https://bs.serving-sys.com/BurstingPipe?cn=ot&onetagid=5467&ns=1&activityValues=$$&
retargetingValues=$$$$&dynamicRetargetingValues=$$$$&acp=$$$$&"
style="display:none;width:0px;height:0px"> </iframe>
</noscript>
Comments