Follow

The following section details several advanced scenarios, customizations, and use cases that can be used when working with VersaTags.

VersaTags can be fired and tracked when buttons are clicked. The process for setting VersaTags on buttons is as follows:

graphic_versatag_buttons

Notes:
  • No additional items need to be added to the main VersaTag code, unless additional parameters will be passed during the 'button' conversion. The options for both passing and not passing parameters during the conversion are described below.
  • Make sure that the URL includes the protocol identifier, for example,"http://site.com" or "https://site.com".

Basic Scenario (No Parameters)

In the basic scenario, where no additional parameters need to be passed, the Webmaster must set the below script into the button/action code:

<script type="text/javascript">

versaTagObj.generateRequest("http://site.com/button1.htm" or "https://site.com/button1.htm");

</script>

The agency must then make up a 'simulated' URL for this button action (the 'site.com/button1.htm' part above), and the agency user should then assign the simulated URL to a mapping rule for this button in VersaTag.

Conversion Tag (with Parameters)

In a conversion tag scenario where an additional parameter(s) needs to be passed, the Webmaster must set the below script into the button/action code. In this example, the parameter is “pageName”, and its value is “new page name”.

<script type="text/javascript">

// set activity parameter value

versaTagObj.setActivityParam("pageName", "new page name");    

// get the activity parameter value that was just set

var pageName = versaTagObj.getActivityParam("pageName");

alert(pageName);

 

 // activate VersaTag to generate a server call and handle the server response 

versaTagObj.generateRequest("http://site.com/button1.htm" or "https://site.com/button1.htm")

</script>

Retargeting Tag (with Parameters)

In a retargeting tag scenario where an additional parameter(s) needs to be passed, the Webmaster must set the below script into the button/action code.

// set retarget parameter value

versaTagObj.setRetargetParam("target", "newTarget");          

// get the retarget parameter value the was just set

var target = versaTagObj.getRetargetParam("target");             

alert(target);

 

 // activate VersaTag to generate a server call and handle the server response 

versaTagObj.generateRequest("http://site.com/button1.htm" or "https://site.com/button1.htm")

</script>

With virtual page site types, the URL address does not change, but the screen is redrawn as the user interacts. ‘Build your own’ web configurators (as in the examples below) often use this technique:

http://www.universalpictures.com/?__source=USMN.GNAV

http://store.apple.com/us/configure/MD770LL/A?

Note: These virtual pages can be drawn via either Flash or JavaScript.

In the above examples, the standard version of VersaTag is not enough. The agency or advertiser will need to modify the ‘data’ section of the code with additional code (API calls). The API call occurs between the VersaTag code (which sits on the HTML page), and the Flash file. The agency must decide where in the Flash file conversion events will be mapped. The code is modified and placed in the usual location for VersaTag (in the page template, at the end of the body section of the code).

For each Flash event that the API calls, a ‘hidden’ URL will be generated. This URL is what gets mapped to conversion events in VersaTag. The URL must include the protocol identifier, for example,"http://site.com" or "https://site.com". The Flash developer will then need to insert the following VersaTag Flash code into their SWF. A global JavaScript function must be created, which can go anywhere in the Flash code (the Flash developer can decide where):

function runGenerateRequest () {

versaTagObj.generateRequest("http://site.com/button1" or "https://site.com/button1");

}

This can be called from Flash using the following command (injected into the Flash code for the specific event that needs to be tracked):

if (ExternalInterface.available)

{

ExternalInterface.call("runGenerateRequest");

}

 

This customization type allows an advertiser the ability to append a unique JavaScript action to each VersaTag execution. The custom JavaScript can be used for additional data collection, or to execute a script designed by the agency.

Note: This customization type can only be activated by Sizmek. Please contact your client services manager or salesperson for additional information.

In some instances, an agency may wish to collect non-standard parameters. In these cases, custom parameters can be manually added after the conversion tag code is generated.

With custom parameter collection, either a mapping report or VersaTag platform setup can be used to get JavaScript code for additional parameters, and a Webmaster copies/pastes into the relevant pages where needed.

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

Comments