Click-tracking line items

Track how users are clicking links in your content

DFP click-tracking line items are unique in that they aren't served by DFP and don't count impressions. Instead, for each click-tracking line item, you can generate a special URL to use in the anchor <a> tags of your content to track how many times users click a link.

Create a click-tracking line item
Add a creative to your click-tracking line item
Generate a click-tracking link to record clicks
Implement a generated click-tracking link in your content
Report on click-tracking line items

Create a click-tracking line item

  1. Sign in to DoubleClick for Publishers.
  2. Click Delivery and then Orders and then New order or create a new line item in an existing order.
  3. When creating a new line item, select Click-tracking only as the line item "type."
  4. Select a start time and end time period in which to track clicks.
  5. (optional) Use the limit to define the maximum number of clicks that DFP should track. Subsequent clicks redirect to the destination URL, but are not counted.
  6. (optional) Select which ad unit or placement should be associated with any recorded clicks. Since DFP doesn't serve text link line items, they can't be targeted to specific geography locations or audiences.
    Create an ad unit dedicated to text links to simplify reporting
    Since click-tracking line items aren't served by DFP, ad units you create for click-tracking links are only used for reporting purposes. Creating a separate ad unit for these special line items can help you distinguish clicks from click-tracking links and clicks from other line item types.
  7. Click Save, or Save and upload creatives if you're ready to move onto the next step.

Add a creative to your click-tracking line item

Click-tracking line items don't have typical creatives. Instead, you add a creative with a destination URL and then generate a special "click tracking link" associated with one of the ad units targeted by the line item. This "click tracking link" is what you use to track each click from a user.

At least one active assigned creative is required
You must have at least one (1) active creative for your click-tracking line item to record clicks.
  1. In DFP, click Delivery and then Line items and find your click-tracking line item.
  2. Click Add creatives and select new creative under "1x1".
  3. Enter a name for the click-tracking creative.
  4. Enter the click-through URL that you want users to reach after clicking the link in your content.
    This click-through URL stops working if you pause your click-tracking line item, or a click falls outside the line item's or creative's start time and end time.
  5. (optional) Define any custom fields to be used in DFP reporting. Learn more about custom fields 
  6. Click Save.

Notice that the status of your line item switches from "Inactive" to "Ready." This indicates you are ready to generate click-tracking link.

Generate a click-tracking link to record clicks

Now that you've created a click-tracking line item and assigned a creative with a click-through URL, you are ready to generate the special URL to use in an anchor <a> tag of your content to track how many times users click that link.

  1. In DFP, click Delivery and then Line items and find your click-tracking line item.
  2. Click Targeted ad unit, under "Generate click tracking link."
  3. Select one of the line item's targeted ad units, or run of network if you didn't target any ad units. The URL displayed below this menu immediately updates to include the selected ad unit.
  4. Copy the URL displayed to your clipboard with Ctrl+C (Windows) or ⌘+C (Mac). 

Implement a generated click-tracking link in your content

Send the click-tracking link you generated in DFP to your technical team to implement in your content. They can replace http:// with https:// in the click-tracking link to make it secure.

Example implementation

Let's say you have an email newsletter and you want to track how many times a user clicks the "Start shopping" link. Your email's HTML code might look like this, after implementing the click-tracking link in your content.

  Thank you for coming to our store.<br />
  <a href="">Start shopping</a>

Since the anchor <a> tags around "Start shopping" include the click-tracking link you generated in DFP, a click will be recorded in DFP when a user clicks the link and the user will be taken to the click-through URL defined in the line item's DFP creative.

Use HTTP error codes to troubleshoot delivery
If the click tracker is inactive, you'll get a "204: No Content" error. An improperly formatted click tracker will produce a "500: Internal Server Error." When it's working correctly, the click tracker generates a "302: Found" response.

Report on click-tracking line items

Non-targeted values, such as the geographic location of the user who clicked the link, are still included in reports, even though targeting is limited to ad units for click-tracking line items.

If you want to append key-values that can be tracked in the Data Transfer "CustomTargeting" field, append custom criteria with the &t= parameter in the same format as non-Javascript tags. For example, here's how you'd append key=value to this click-tracking link:

Was this article helpful?
How can we improve it?