URL Path Naming (JavaScript)

Toma
  • Updated

Adform standard URL path tracking code is used to track the visits of a website either on one specific page, or multiple pages. This code generates unique tracking points based on the URLs where it's activated from. The tracking code uses JavaScript functions, which gather visit count, basic visitor information (such as browser type, operating system, or screen size), and sends this information along with campaign data to Adform servers.

In case of a website with dynamic URL appending (such as website.com/?pageId=3 or website.com/?pageName=homepage), consider using custom tracking instead. Since the URL Path template has no name placeholder inside the code, it will automatically pick it up from the page URL.

Once fired, the code will check the URL and apply the rules that help reduce the possibility of the reached tracking points limit issue:

  • Remove all the details that go after ?, #, =, ; (for example, for a URL http://www.adform.com/landingpage?utm=abc123 the tracking point name can be "adform.com/landingpage")

  • Cut out numeric values if there are 3 or more in a row (for example, for a URL http://www.adform.com/register/user1234/success the tracking point name can be "adform.com/register/user/success")

  • Cut out GUID parameters (for example, for a URL http://www.adform.com/register/be4da8dd-ba78-47a6-8717-bb59aca0ab28/user the tracking point name can be "adform.com/register/user")

Note

URL path is the most suitable option for tracking general pages (for example, About Us, Contacts) and Category, Subcategory pages for e-shops.

We don't recommend choosing URL Path Naming for tracking the whole website. For example, Blog, News, Events, Product, and Order Confirmation pages should be excluded from tracking with URL Path. Otherwise, it may result in reaching the tracking point limit too fast and new tracking points not being registered.

Implementation

Implement the code received to any part of the source code or respective tag management field which supports HTML code.

As the tracking code generates tracking points dynamically, it's recommended to exclude it from pages that are not required to be tracked, such as development, CMS, or test pages.

Custom Variables

Additional information can be collected by the tracking point with the use of variables, such as sales, order IDs, product names, or other custom values. For conversion page tracking, we recommend implementing a unique naming tracking point. To collect values from your website, macros from the CMS or tag manager system could be used. This information should be passed to the code via the respective system variables, data layer, or other tools to get variable values from the site.

Extended IDs

By passing extended identifiers with tracking point requests, you can collect first-party data-based audiences.

Javascript based tags support common openRTB eids format https://github.com/InteractiveAdvertisingBureau/openrtb/blob/master/extensions/2.x_official_extensions/eids.md

Check Implementation

After implementing the tracking point on a page, you can check if it was activated using Adform site tracking testing browser extension. You can download it for a Chrome browser from the Chrome web store.

Alternatively, you can check network requests via the browser’s developer tools:

Network 2

Successful activation will result in two network requests, which are:

  1. Tracking point library

  2. A tracking point request, which contains the tracking setup ID, tracking point name, and other information sent

For additional information, contact the Site Tracking team (site-tracking@adform.com).

Was this article helpful?

/
How we can make it better?

Thank you for your feedback!