Back

In this article: 

Table of Contents Placeholder

Prerequisites

This method requires utag.js version 4.26+ and for your site to be loading the jQuery Library

How it Works

Normally you choose which Tags load on a page by configuring a load rule and applying it to your Tags. But what if you don't want to load a Tag on page load, and instead load the Tag after a visitor takes some action or some event occurs on the page? Here's one way to do that.

  1. Create a load rule with a condition that always evaluates to false. Something like URL is not defined. This should only need to be done once, and can be used for any tags you want to fire in this fashion. This load rule will prevent the Tag from firing at page load.
  2. Add your tag and assign it the load rule created in step 1.
  3. When creating a jQuery onHandler extension, select "custom" from the tracking event drop down. In the text field that displays enter a hard-coded utag.view call in the following format:
    utag.view( {DATA OBJECT CONTAINING YOUR KEY/VALUE PAIRS}, null, [ARRAY OF UIDS YOU WANT THIS CALL TO FIRE]);

The UIDs can be found by looking to the right of each tag on the tags tab:
140924_bf1.png

For example, assume we wanted to fire off the Doubleclick Floodlight tag in the screenshot above when an element with the id of "mybutton" was mousedowned, and pass the tag a page_name of "my_form_page" and a form_name of "my_form". The extension would look like this:
140924_bf.png