Resources/Help Topics/Third-Party Integration & LiveBall Tracking

Add third-party script to your LiveBall pages

David Kavalsky
posted this on May 25, 2011 16:29

LiveBall can support most third-party scripts. While tracking is typically specific to your organization, below are some basic steps that will help you successfully integrate scripts into your landing pages.

Pre-requisite

Obtain your script directly from the vendor.

 

Upload To Your Global Script Library

The global script library enables you to add your script to any particular campaign or page, but manage the actual script and/or code centrally. This allows you to make any edits or updates in a central location.
 

Start by pasting the script into your LiveBall global script library:

  • Hover over the “libraries” navigation tab at the top of the LiveBall screen and select “scripts.” 
  • You can now add a new script category by pressing the green “+category” button
    • Categories make it easy to organize scripts into manageable groups
    • Title your category in a way that is easily understood, like "Google Analytics", "Double Click", etc.
    • Add a description, if necessary, to help clarify what is in that category
    • Click save
  • Once you have created a category, you can add the actual script.
    • Click the magnifying glass next to the script category
    • Add a new script by pressing the green “+script” button
    • The category you are in should be selected in the drop down by default, but you can always change the category if necessary by selecting a different one in the drop down menu
    • Label your script so it is easily recognized
    • Add your script in the section that follows “Script:”
    • Click Save

 

Add Script to Campaign, Creative, or Specific Page

  • The campaign-wide, creative-wide and page-specific script editors include a script drop-down menu to simply select the script that was pasted into your Global Scripts Library in steps 1-3. 
    • To add a script at the campaign level:
      • Click the pencil to the right of your campaign title in the campaign management tab
      • Select script from drop-down menu to the right of “Campaign-wide library script”
    • To add a script at the creative level:
      • Click the pencil to the right of the creative title in the creative management tab
      • Select script from dorp-down menu to the right of “Creative-wide library script”
    • To add a script at the page level
      • Click the pencil in the bottom left corner of the page’s thumbnail you wish to edit
      • Click “script” at the top of the page
      • Select the script you would like to use in the section you would like to use from the appropriate drop down menu.  
  • Note: Scripts can be added to either the head or body of a given page

Script Placement

When implementing third-party code at the campaign and path level, LiveBall automatically places the code above the closing BODY tag in the script.

When implementing third-party code at the page level, LiveBall gives you four options:

  •  Page script (at bottom of page body). This is the original 'page script' feature that had been in there before (for you long-time LiveBall users). Whatever HTML or Javascript you put here will be included in the page at the very bottom, right before the closing BODY tag.
  •  Page script (in page header). Any HTML or Javascript you put here will be included in the HEAD block of the page, before the BODY tag even begins. This may be useful for certain types of Javascript functions that need to run—or at least exist—before the 'body' of the page begins to load.
  •  Page onload. Any snippet of Javascript code you put here—such as a call to a function add in the header script above—will get added to an 'onload' parameter in the BODY tag of the page. For example, if you put "dosomethingcool();" into that field (without the quotes), it would appear in the page as:  < body onload="dosomethingcool();" >
  • Page onunload. Similarly, any snippet of Javascript code you put here will get added to an 'onunload' parameter in the BODY tag of the page. This might be useful for having pop-up windows or alerts or other "are you sure?" offers appear to respondents when they try to leave the page or close the browser window. (NOTE: people don't necessarily like those type of pop-ups.) For example, putting "lastditcheffort();" into this field (without the quotes) would appear in the page as:  < body onunload="lastditcheffort();" >

Tip—Javascript functions such as the hypothetical examples of dosomethingcool() and lastditcheffort() would typically be defined in the page script, probably in the header.


Pass Dynamic Information Into Your Script:

Depending on what you would like to pass to your third party script/code vendor, you can leverage LiveBall core fields to do so dynamically.  Below is a list of LiveBall core fields you can plug into third party script/code that will be replaced with their respective values dynamically.  For example, if you wanted to populate the third party script/code with the traffic source URL, you would plug “@@TrafficSourceLabel” into the script.  “@@” followed by the data name or core field name will accomplish dynamic substitution.  

 

  • UserID: Unique numeric string associated with each visitor across all creatives visited
  • RespondentID: Unique numeric string assigned to each visitor, traffic source-specific
    • *Note: A visitor will only have one (1) UserID but could have multiple RespondentID’s if one respondent visited multiple landing pages.
  • CampaignID: Numeric value assigned to a campaign by LiveBall
  • SourceID: Numeric value assigned by LiveBall to a traffic source
  • Referrer: Referring URL, if available
  • Converted: Y/N value indicating if the respondent is tracked as converted
  • Grade: Score or letter grade assigned to respondent based on actions they take navigating through the creative.  Assigned via advanced rules.
  • GeoCountry: Respondent’s country as identified by their IP address
  • GeoRegion: State/region respondent’s IP address identifies
  • GeoCity: City respondent’s IP address identifies
  • GeoPostalCode: Zip/postal code respondent’s IP address identifies
  • GeoDomainName: Respondent’s domain name as indicated by IP address
  • PageLabel: Name assigned to page in LiveBall by creative producer
  • PathLabel: Name assigned to landing experience in LiveBall by creative producer
  • TrafficSourceLabel: Destination URL of creative
  • TrafficSourceDesc: Notes made in LiveBall by creative producer at the traffic source