If using Google Web Designer, be sure to set up your project for the "Non-Google Ad" environment. This will generate functions for interactions to which eyeBuild functionality can be added. eyeBuild cannot be added if a GWD project is exported for the Google-specific environments. Also, do not select the publish option to "minify" code, as this further interferes with the ability to make modifications or fixes.
IMPORTANT! eyeBuild cannot be used for files that eyereturn is not serving (ie – most CPC placements)
Importing & Initializing eyeBuild
The current version is:
In the html file that requires eyereturn tracking, include the eyeBuild js:
You need to include the js file in all files that require eyereturn tracking. Before calling any tracking methods, call:
If your document has a function that is executed when the unit has loaded, the initialize call should be included in that function. If you are unsure where to place this call, you may also place it in an empty script tag, as seen below:
Note: initialize() only needs to be called once. If multiple files include the eyeBuild js, call initialize() before the first use of any eyeBuild methods.
|eyeBuild.initialize()||Initializes eyeBuild. This must be called upon load and initialization of the ad unit, and before using any methods of eyeBuild.|
|eyeBuild.doClick(n, val1, val2, val3, redirURL)
||Clickthrough Wherever you handle the clickthrough event, call the doClick method. If your ad has multiple clickthrough destinations, pass the ID number of the click as a parameter to the doClick call. The default clickthrough ID is 0, therefore additional clickthroughs begin at 1. Be sure to make your contact at eyereturn aware of which URLs correspond to each clickthrough IDs, as they will be responsible for ensuring the URLs are called by the appropriate click events.
Note: For almost all standard ads, n is the only parameter needed. Eg eyeBuild.doClick(0) invokes clicktag 0.
Dynamic Clickthrough Some clickthroughs need to be dynamically contructed, including variables from the ad unit as part the destination. In these cases, you may pass up to three strings as optional arguments to the doClick method.
For example, imagine that your ad unit features ten cars, each a different colour, and a mix of car models. All the cars are clickable to the same destination, but you need the colour of the car clicked included in the query string in order to affect which version appears on landing page.
To accomplish this, all of the clicked cars should make slightly different doClick calls. Specifically, the Black Sedan indicated by the above URL would be called as follows:
eyeBuild.doClick(0, "Black", "Sedan", "None");
Provide your contact at eyereturn with instructions on how to construct the URL from the variables passed. In this case, they would need to know that the clickthrough needs to be constructed as follows:
||Event Tracking - If your ad unit requires tracking of content specific interactions (ie: a replay button, or the tracking of transport controls in a video unit), you must implement a doIAT() call when the event occurs. Each call requires a corresponding ID to be passed as an argument to the call.
The following are the standard IATs for the most common tracking events. Implement these wherever applicable in your ad unit. For events not covered here, use the doCustomIAT() method as described in the next section.
||Custom Event Tracking - For unique events not covered in the previous section, the doCustomIAT() method allows you to create up to 100 of your own tracking events, which will appear in reporting with the names of your choosing. First, create a list of the events you wish to track with the event name to be displayed in reporting, and a corresponding ID number, starting from 0 and incrementing for each new event. You will need to provide this list to your eyereturn contact upon delivery of the ad unit.
Feel free to use both standard doIAT() and custom doCustomIAT() tracking events in the same unit as required, but for continuity in reporting we prefer that the pre-defined doIAT() calls are used wherever applicable. For instance, we would advise against creating a custom event for "Send" where the "Submit" event doIAT(18) would suffice.
||Drops an image pixel.|
||Drops a script pixel.|
|eyeBuild.doOpen()||Used to display the expanded portion of an expanding ad unit. Only click-to-expand banners require a doOpen call; the more common rollover-to-expand configuration does not require a doOpen call, or any code to detect the user's rollover. All expanded files require a close button with the doClose call.|
|eyeBuild.doClose()||Used to close an ad unit. Necessary in the expanded portions of expanded ad units, in vokens, etc.|
Please note that these guides are old and unmaintained, and may not reflect the current state of their respective development environments. We recommend reading and applying the instructions as presented on this page, as they are up to date and applicable to all methods of development.