The VersaTag code

advertisement
Tier II Training
Global Support Training – Tier II
VersaTag Overview
Valgeir Sigurdsson
25/05/2013
x
1633 Broadway, 5th Floor
New York, New York 10019
P + 1.212.953.9300
F 1.212.201.0801
www.dgit.com
Tier II Training – VersaTag Overview
Contents
Conversion Tags: Quick Overview ............................................................................................ 3
How conversion tags work ..................................................................................................... 3
Types of Tags ........................................................................................................................ 3
Which Pages Should Include Conversion Tags ..................................................................... 3
What is VersaTag ...................................................................................................................... 4
The key benefits of VersaTag: ................................................................................................... 4
Implementing VersaTags ........................................................................................................... 5
Deployment: ........................................................................................................................... 5
1. Determine Tagging Needs ............................................................................................. 5
2. Configure and Deploy VersaTag Code .......................................................................... 5
3. Review VersaTag administrative and tagging procedures ............................................. 5
4. Create mapping rules ..................................................................................................... 5
5. Test VersaTag Mapping ................................................................................................. 6
6. Migrate existing tags on site into VersaTag ................................................................... 6
The VersaTag code ............................................................................................................... 6
Synchronous and asynchronous tags .................................................................................... 7
Where to place the VersaTag ................................................................................................ 8
Button implementation ........................................................................................................... 8
FAQ ........................................................................................................................................... 9
How does VersaTag handle URL Query Strings? ................................................................. 9
How should VersaTag be deployed across multiple domains? ........................................... 10
Is VersaTag private and secure? ......................................................................................... 10
50 Great Sutton Street, 5th Floor
London, EC1V 0DE UK
www.dgit.com
Tier II Training – VersaTag Overview
Conversion Tags: Quick Overview
In order to dig deeper into the functionality of VersaTags, it is important to first understand
what a conversion tag is and how it works.
Typically, clicking on an ad on the publisher site directs the user to a page on the advertiser’s
website. Using conversion tags makes it possible to track a user’s activity on the advertiser’s
site after viewing or clicking on an ad.
Such activities may include:

Visiting a tracked page

Registering for a newsletter

Buying a product
How conversion tags work
To track conversions, dedicated conversion tags are created in the mediamind platform and
are typically named according to the conversion to be tracked, (e.g. homepage, landing page,
confirmation page), The conversion tags are generated and then placed on various pages on
the advertiser’s site where the conversions will be tracked.
Before a campaign starts the conversion tags need to correctly implemented and may be
reused across multiple campaigns.
Types of Tags
There are two types of conversion tags:

Counter Tags count actions, for example: the number of times the page was visited,
a button clicked on, and so on. If a user makes a purchase on a site, a counter tag
can be placed on each of the different pages corresponding to the stages of the
purchase. It is then possible to track how many times users reached certain points in
the process up to the checkout page.

Sales Tags record a number of variables including revenue, quantity, order ID,
product ID, and product information. The tags are typically placed on the Thank You
page that appears after a completing a transaction.
Which Pages Should Include Conversion Tags
Before placing tags on the advertiser site, it is important to define what will be tracked. It is
recommended to follow these guidelines:

Set up conversion tags only in a section set up for the product advertised in the
campaign. Otherwise, conversion tags are "wasted" on general pages that attract
mostly random users not interested in the specific offering.
50 Great Sutton Street, 5th Floor
London, EC1V 0DE UK
www.dgit.com
Tier II Training – VersaTag Overview

For each section or page within the site that is considered a step in the conversion
process, a different conversion tag should be used. For example, if the user goes to a
page in the site that describes a product and is offered to buy the product, you may
want to track a number of different pages that the user would go through, such as:
o
Product Info: The first page the user encounters.
o
Select Product: Where the user selects the specific model and quantity.
o
User Info: Where a user registers.
o
Billing Info: Where the user enters credit card information.
o
Checkout: Where the user confirms the purchase.
o
Thank You: Where the purchase is confirmed.
What is VersaTag
MediaMind’s VersaTag allows for a single and secure tool to deploy, manage and update all
your digital marketing tags without having to constantly update your website’s code. The
VersaTag code requires a single deployment: the code is placed in a standard location
(usually either the top or bottom of the <Body> section) across all your site’s pages. After that,
all new conversion, retargeting and 3rd party tags can be easily managed within the
VersaTag UI. The UI gives the tag administrator the power to efficiently and scalably control
which tags fire on which pages. There should be no further need to touch the website in order
to implement most new tagging requirements!
The key benefits of VersaTag:

Significant simplification to deployment and management of advertising tags

An easy, platform-integrated interface to map specific URLs tags

Secure alert system to monitor page view drops
Conversion Tag

Deployment and management can
VersaTag

be confusing and time consuming
Significant simplification to
deployment and management of
advertising tags

Separate tags implemented on

advertiser’s pages

Conversion related changes require
Single tag throughout all advertiser
pages

No need to touch the website code to
new tags to be sent to advertiser who
implement changes to most tagging
will need to manually replace old tags
requirements
with the new ones
50 Great Sutton Street, 5th Floor
London, EC1V 0DE UK
www.dgit.com
Tier II Training – VersaTag Overview
Implementing VersaTags
Deployment:
VersaTag can be deployed through a simple six-step process:
1. Determine Tagging Needs
The webmasters works together with their Agency and Mediamind product expert, an audit of
the campaigns and website can be conducted to determine requirements around conversion,
retargeting, 3rd party tags, business rules, attribution, special domain structure, restricted
pages, permissions, tag parameter requirements, dynamic pages, embedded Flash and site
events.
2. Configure and Deploy VersaTag Code
Once requirements have been defined, a VersaTag deployment strategy is formulated. The
VersaTag is then configured, and then the tagging code is generated and placed in the
<body> section of the website’s main templates on the CMS. Typically, where you place
VersaTag in the <body> section depends on whether you configure VersaTag for
asynchronous or synchronous mode.
Also, if external parameters need to be passed into VersaTag, for use by one of the contained
conversion, retargeting or 3rd party tags, you will want to also insert code to pull and process
any of this external page data prior to invoking VersaTag. VersaTag and its supporting code
should be deployed to all the website’s pages.
The client will need to provide the following information to the Mediamind account manager:

Parameter Name

Type (Is it an Activity/Conversion Parameter, Retargeting Parameter or Conditional
Parameter)

Desired order of the parameters (the order that you provide your account manager
should be the same as the order you pass them into VersaTag)

Parameter’s datatype – is it a number, date or string
3. Review VersaTag administrative and tagging procedures
VersaTags user permissions are set up. New 3rd party tags are reviewed and its potential
impact on page load performance assessed.
This is also a good time for the Webmasters to identify if there are pages that they do not
want VersaTag to execute on. VersaTag allows the Webmaster to create a white list of pages
for which VersaTag will be called. Note that if there are no restricted pages, then the
Webmaster can simply leave the whitelist blank.
4. Create mapping rules
50 Great Sutton Street, 5th Floor
London, EC1V 0DE UK
www.dgit.com
Tier II Training – VersaTag Overview
Mapping rules are set up to map one or more web pages to their corresponding Conversion
or Retargeting tags. To simplify the mapping process, VersaTag gives you the flexibility to
group related pages together with wildcards, or import them into the system with Excel.
5. Test VersaTag Mapping
Once VersaTag has been deployed on the site, you can use VersaTag’s debug and auditing
tool to test the reliability of the mapping or tag deployment while navigating the site.
The VersaTag test page can be found at:
http://bs.serving-sys.com/BurstingPipe/adServer.bs?cn=at
This page 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 to the MediaMind servers.
6. Migrate existing tags on site into VersaTag
Once VersaTag is set up, you will want to migrate all your site’s old tags into VersaTag’s
container. This is important so that these tags aren’t called twice in error. To facilitate this
migration process, VersaTag includes a comprehensive mapping report, which allows you to
track and audit the progress of your migration.
The VersaTag code
When the VersaTag code is generated it will look like this:
01. // VersaTag parameters section
02. <script>
03. var versaTag = {};
04. versaTag.id = "174";
05. versaTag.sync = 0;
06. versaTag.dispType = "js";
07. versaTag.ptcl = "HTTPS";
// the VersaTag object
// ID of the VersaTag
// request synchrony type (0 = async / 1 = sync)
// type of response (JavaScript / iframe)
// http request protocol (http / https)
08. versaTag.bsUrl = "bs.serving-sys.com/BurstingPipe";
09. versaTag.activityParams = {
// optional activity parameters
10. "pageName":"Welcome Page",
11. "orderId":orderId,
12. "productId":prodId,
13. "quantity":quantity
14. };
15. versaTag.retargetParams = {
// optional retargeting parameters
16. "RetargetingId":"RetargetingValue",
17. "target":"RetargetingTarget"
18. };
19. versaTag.conditionalParams = { // optional conditional parameters
20. "Param1":"value1",
50 Great Sutton Street, 5th Floor
London, EC1V 0DE UK
www.dgit.com
Tier II Training – VersaTag Overview
21. "Param2":”value2",
22. "Param3":"value3",
23. "Param4":"value4"
24. };
25. </script>
26.
27. // VersaTag execution section
28. <script id="ebOneTagUrlId" src="https://secure-ds.servingsys.com/SemiCachedScripts/ebOneTag.js"></script>
The variables defined in lines 1 to 8 are parameters configured by the VersaTag administrator
on the VersaTag platform, and should not be modified. Lines 9 – 24 show how variables are
passed into the VersaTag container.
All parameter arrays are comma-delimited and take the form “<parameter_name>”:
“<parameter_value>”. Note that numeric parameter values do not need to be encased in
double-quotes.
There are three sets of variable arrays:
1) The VersaTag.activityParams array contains a list of optional parameters that get passed
directly into any of the Mediamind conversion tags contained within the VersaTag. Note that if
the Conversion tag contains any 3rd party tags that require variables to be passed in, these
variables are then passed into the Conversion Tags through activityParams first, before being
fed into the 3rd party tag using macros.
If a VersaTag contains sales conversion tags, then the standard parameters of a sales
conversion tag will be auto-generated in the VersaTag tagging code. The parameters will then
get passed into the sales conversion tag being fired on a particular page.
2) The VersaTag.retargetParams array contains a list of optional parameters that get passed
directly into one of Mediamind’s static retargeting tags with values contained within the
VersaTag.
Note that parameters for Mediamind dynamic retargeting tags are not passed through this
array. This array is only meant for static retargeting tag. If you’re not sure of what type of
Mediamind retargeting tags you are using, please consult the Mediamind account manager.
In VersaTag, dynamic retargeting tags should be executed within Mediamind conversion tags,
just like other 3rd party tags. We anticipate direct support of dynamic retargeting tags within
VersaTag in the next release.
3) The VersaTag.conditionalParams array contain a list of optional parameters that can be
used to feed conditional logic that determines whether or not a particular 3rd party tag should
fire.
The final lines, Lines 27 – 28 is the VersaTag activation section, and should not be altered.
Synchronous and asynchronous tags
Sync mode refers to whether the page should wait until VersaTag responds before continuing
to load. When VersaTag is in synchronous mode, then the web page waits until VersaTag
50 Great Sutton Street, 5th Floor
London, EC1V 0DE UK
www.dgit.com
Tier II Training – VersaTag Overview
responds before proceeding. The web page then has to wait until all relevant conversion,
retargeting and 3rd party tags within the VersaTag are executed before proceeding.
When VersaTag is in asynchronous mode, the web page does NOT wait for a response, and
simply proceeds with the rest of the page load, whether or not it hears back from the
VersaTag server.
Asynchronous VersaTags have a minimal impact on site performance since they are
executed in parallel with the site’s page load. In general, this should be your preferred mode.
Synchronous VersaTags, on the other hand, are not executed in parallel with the loading of
the page, rather, after the page passes control to VersaTag, VersaTag fires all their relevant
tags before returning control to the page. However, since synchronous tags are often placed
at the bottom of the <body> section so as not to interfere with page loads, there is a greater
likelihood that the user navigates away from the page before all contained tags are able to
fire, leading to some data loss.
Where to place the VersaTag
This depends on two factors:

Are you running synchronous or asynchronous tags?

Does the VersaTag rely on page-level variables?
The first question is important because it determines whether page-load time will be impacted
by VersaTag. Though we can guarantee that Mediamind conversion and retargeting tags
should have relatively insignificant processing time, and thus not impact load times
significantly, there is no guarantee that various 3rd party tags that you may apply to VersaTag
will process in an acceptable timeframe.
The second question is important because if VersaTag relies on page-level variables, the surest
guarantee that those page-level variables are fully loaded and calculated before passing them to
VersaTag is if the VersaTag code is placed towards the bottom of the page.
Button implementation
If you need VersaTag to register a website event, such as a button click, then you will need to
insert the following code:
1. <script type="text/JavaScript">
2. versaTagObj.generateRequest(“http://www.site.com/button1.html");
3. </script>
The code above works for VersaTag calls that do not require any additional custom
parameters passed into it. If, on the other hand, the event needs to call a VersaTag which
requires parameters passed into one of the contained Conversion, Retargeting or 3rd Party
tags/conditional logic, then the following code is required after the website event is triggered.
Note that you need to clear the parameter buffers before setting their value:
1. <script type="text/JavaScript">
2.
3. // set activity parameter value
4. versaTagObj.clearActivityParam();
50 Great Sutton Street, 5th Floor
London, EC1V 0DE UK
www.dgit.com
Tier II Training – VersaTag Overview
5. versaTagObj.setActivityParam("paramName", "new parameter value");
6.
7. // get the activity parameter value that was just set
8. actParamVal = versaTagObj.getActivityParam("paramName");
9.
10. // set retarget parameter value
11. versaTagObj.clearRetargetParam();
12. versaTagObj.setRetargetParam("paramName", "new parameter value");
13.
14. // get the retargeting parameter value the was just set
15. retargetParamVal = versaTagObj.getRetargetParam("paramName");
16.
17. // set conditional parameter value
18. versaTagObj.clearConditionalParam();
19. versaTagObj.setConditionalParam("paramName", "new parameter value");
20.
21. // get the conditional parameter value the was just set
22. conParamVal = versaTagObj.getConditionalParam("paramName");
23.
24. // activate versa tag to generate a server call and handle the server response
25. versaTagObj.generateRequest(“site.com/button1.htm")
26.
27. </script>
This technique will also work for virtual pages where the URL does not change.
Note that if the site event that you are attaching VersaTag to takes user outside of the
Advertiser’s domain – for instance, a button that takes the user to the Advertiser’s Facebook
page – then make sure you open the link in another browser window in order to ensure that
the in-domain session remains open, and all tags within VersaTag can fire.
FAQ
How does VersaTag handle URL Query Strings?
Many websites include a query string at the end of their URL, as illustrated here. This is
particularly common in system-generated web pages, such as the Internal Search Results, or
the Product Catalog pages.
The values in the query string could actually represent a true unique page, but it can also
contain some computer-generated random variable that should be ignored, such as account
ids or cache-busters. VersaTag lets you configure your mapping rules to conform to one of
the two cases as needed.
VersaTag allows you to specify in your mapping rules, whether or not parameters at the end
of a URL should be treated as distinct pages or not.
50 Great Sutton Street, 5th Floor
London, EC1V 0DE UK
www.dgit.com
Tier II Training – VersaTag Overview
How should VersaTag be deployed across multiple domains?
It is often easier to manage a different VersaTag for each domain that you manage. Note
though that this strategy may lead you to create duplicative mapping rules, particularly if there
are parallel structures across your different domains (for instance, parallel sites for different
languages). Generally, we recommend different VersaTags when different domains are
managed by a different webmaster.
However, it sometimes makes sense to have a single VersaTag across multiple domains,
particularly if you maintain a series of microsites with a single VersaTag administrator, who
prefers to manage all mappings from a single VersaTag interface.
Note that VersaTag also has settings that allow you to manage mapping rules to make them
applicable across sub-domains. For instance, if you needed mysite.com/page1,
de.mysite.com/page1, fr.mysite.com/page1 and uk.mysite.com/page1 to fire the same
mapping rule, then you can simply create a single mapping rule containing the primary page,
and configure the mapping rule to fire across all related sub-domains.
Is VersaTag private and secure?
Yes. VersaTag does not store any data inside it beyond page view counts for each mapping
rule. No VersaTag data is stored in the Mediamind cookie, and only non-PII data for
conversion reporting is collected by any Conversion tags within a VersaTag implementation.
Data is not stored client-side.
With VersaTag, you are in full control of which pages receive the VersaTag, and you can
restrict VersaTag execution to an explicitly defined white list of pages.
All VersaTag execution methods can be encrypted in an HTTPS protocol, allowing you to
protect any sensitive data from sniffers. In fact, you can even force VersaTag to always use
the HTTPS protocol, regardless of the security policy of the parent page.
50 Great Sutton Street, 5th Floor
London, EC1V 0DE UK
www.dgit.com
Download