Version 5.0
AdvertServe User Manual :: v5.0

Action Tracking

Typical Usage

Actions are meant to represent leads or sales that are generated some period of time after a visitor views and clicks on an advertisement. For example, a banner might lead to a landing page with a contact form and you want to track how many successful leads you have referred through that contact form. Another example would be a landing page prompts a visitor to sign up for a service and you want to track the number of signups that you've referred.

It is also possible for advertisers to pass along an invoice number along with a revenue amount for purchases, which allows you to provide them with return on investment (ROI) reporting.

How It Works

An action tracking code must be implemented on your advertisers web site in order to track actions from visitors that viewed and clicked on one of their advertisements.

In most cases the advertiser will place the action tracking code on their contact, order or sign up confirmation pages.

The action tracking code does not visibly display anything in the page. It simply makes a HTTP/HTTPS request to check if visitors are already cookied by the ad server. The ad server can then look up a server-side history of which advertisements they've viewed and clicked on. This ensures that actions will only be tracked for visitors that you've referred.

Here's an example of what the JavaScript action tracking code actually looks like:


<script type="text/javascript" src="http://adserver.example.com/servlet/track?aid=123&javascript=true&invoice=[invoice]&revenue=[revenue]"></script>

Some advertisers might be reluctant to use a JavaScript action tracking code, however, which you can handle by checking the NOSCRIPT option when generating the action tracking code with the code wizard and the resulting code will look like this instead:


<img src="http://adserver.example.com/servlet/track?aid=123&invoice=[invoice]&revenue=[revenue]" border="0" width="1" height="1" alt="" />

In both cases you'll see the [invoice] and [revenue] placeholders for the advertiser to optionally replace with the invoice number and revenue amount.

Caveats

The ad server must be able to track clicks on your advertisement for it to be able to track post-click actions. Clicks cannot be automatically tracked with some types of rich media creatives and third party tags. With some modification, however, it is usually possible to track clicks though. See the chapters on Advanced Click Tracking and Third Party Click Tracking for more information.

You might also consider enabling Post View Action Tracking in the server settings if you need to work with third-parties that do not support tracking clicks on their tags. This is not enabled by default. Tracking post-view actions can dramatically impact performance so you should consult technical support before enabling it.

Web Page Coding

Generating an action tracking code is very simple and only requires a few steps.

  1. Go to the Code Wizard
  2. Click on Action Code > HTML in the navigation menu on the left
  3. Select the Advertiser from the drop down
  4. Optionally check the Macro: Invoice Number and Macro: Revenue Amount options if the advertiser wants to pass along those details
  5. If the advertiser prefers not to use a JavaScript tracking code you may check the NOSCRIPT option to generate a simpler image-based tracking code
  6. Press the Generate Code button

The advertiser will need to place the generated action tracking code on their contact, order or sign up confirmation or thank you pages.

Advanced Usage

Piggyback Pixels

The action tracking pixel supports piggybacking to enable third-party tracking without requiring the advertiser to implement additional coding. If you are using JavaScript pixels you can actually piggyback an unlimited number of pixels. However, if you are using a more traditional <IMG> tag pixel you will be limited to a single piggyback pixel. This is because <IMG> tag piggybacking must be implemented with a HTTP redirect.

To set up a piggyback pixel you will need to go through the following steps assuming you have already placed an action tracking code on an advertisers web site:

  1. Go to Settings > Pixels
  2. Create a new JavaScript or Image pixel depending on the advertisers requirements
  3. Go to Accounts > Advertisers
  4. Edit the advertisers account
  5. Select the pixel you created as the Action Pixel in the Piggyback Pixels section

Once you have completed these steps you piggyback pixel(s) will automatically be tied to any action tracking codes for this advertiser or their campaigns/media.

You might wonder why this process is not tied into the code wizard? The reason is that you might not have the piggyback pixel up front or you might want to remove it later. By decoupling this process from the code wizard you can perform either of those tasks without the advertiser needing to update their action tracking code, which is often a painful process as advertisers are usually unwilling or slow to change coding.

S2S Pixels

How can you track actions if you are running a feed of ads from a third party ad network and have no way to provide your action tracking pixel to the advertisers? The answer is sadly that you cannot most of the time because not very many third party ad servers support third party action tracking. However, for the few that do support server-to-server (S2S) pixels, you are in luck because the ad server does support it!

Server-to-Server Method

This method allows the advertiser to record the unique click identifier (ClickID) for the visitor from the ad server by including it in the redirect for the creative landing page. To do this, simply place the %%CLICKID%% macro in the Redirect URL for the creative using their designated parameter name. In the example below we use click_id for the parameter name, but this will be different for every advertiser so make sure to check with them!

http://www.example.com/landing/page.jsp?click_id=%%CLICKID%%

When the creative is clicked and redirected to the advertisers site the %%CLICKID%% macro will be replaced with the ClickID value, which will contain between 34 and 43 alphanumeric characters.

You also need to generate Action Code with the Code Wizard to give to the advertiser. In fact, you specifically want to generate an S2S action tracking code, which is commonly referred to as an S2S pixel. They will need to pass back the ClickID value they recorded with the click as shown in the example below.

http://adserver.example.com/servlet/track?clickid=6d00f26e9c94c09c4b828528687b98bb-12345

This enables the ad server to determine precisely which click resulted in the action being performed. Typically the S2S pixel will be called with a server-side HTTP request by the advertiser. However, it is also fine for them to make a client-side request by placing the S2S pixel in an <IMG> tag since it will display a 1x1 pixel.

URL Passing Method

Some third-party agencies may not have the capability to record the ClickID. However, they might be able to accept your S2S pixel as a URL parameter added to their third-party tags. Here's a simple example of what such a code might look like with placeholders for the click and action tracking URLs shown highlighted.


<SCRIPT type="text/javascript">
document.writeln('<SCR'+'IPT type=text/javascript src="http://example.agency.com/ads/campaign?id=123456&click=CLICK_URL_HERE&action=ACTION_URL_HERE">');
document.writeln('</SC'+'RIPT>');
</SCRIPT>

What you need to do is replace CLICK_URL_HERE and ACTION_URL_HERE with the URLs that the ad server uses to track clicks and actions. This is actually very simple to do because the ad server has %%CLICKTAG%% and %%ACTIONTAG%% macros designed specifically for this purpose. So, go ahead and replace those placeholders with those macros and you will end up with the following:


<SCRIPT type="text/javascript">
document.writeln('<SCR'+'IPT type=text/javascript src="http://example.agency.com/ads/campaign?id=123456&click=%%CLICKTAG%%&action=%%ACTIONTAG%%">');
document.writeln('</SC'+'RIPT>');
</SCRIPT>

The third-party ad server has the option of making a server-side HTTP request with the action tracking URL or they can choose to load it on the client-side with an <IMG> tag since it will display a 1x1 pixel.

Note Note

Some third parties may require you to supply them with unencoded or unescaped click and action tracking URLs. If that is the case, simply use %%CLICKLINK%% and %%ACTIONLINK%% instead. Those macros are designed to produce the same tracking URLs with the exception that they will not be URL encoded.

Occasionally some third parties may require you to supply them with click and action tracking URLs that are encoded or escaped multiple times. If that is the case, simply use %%CLICKTAG2%% through %%CLICKTAG5%% or %%ACTIONTAG2%% through %%ACTIONTAG5%% instead. Those macros are designed to produce the same tracking URLs with the exception that they will be URL encoded as many times as the number within them specifies.

Warning Warning

The generated action tracking URL will always use the HTTPS protocol. More often than not it will end up on a secure page, such as an order confirmation page. Not using HTTPS by default, which we must do because we can't detect the protocol of the destination page in advance, would cause a browser security warning on secure pages. However, using HTTPS on a non-secure page does not have that same effect, so it's safest to always use HTTPS to avoid causing any browser security warnings. You should take care to make sure your ad serving domain actually supports HTTPS though!