AFL UTM Tracker Documentation

  1. Home
  2. Docs
  3. AFL UTM Tracker Documentation
  4. Developer
  5. Append UTM to Outbound URLs

Append UTM to Outbound URLs

You can append the UTM parameters to your outbound URLs on the frontend pages using the JavaScript code below.

Requirements

Objectives

Your own two websites with different root domain names where your marketing campaigns are first directed to your landing site (Site A) but visitors who are interested in your products will have to fill up the form on your main site (Site B).

  • Site A: www.example-blog.com
  • Site B: www.example.com or shop.example.com

You want to understand the user’s conversion journey from how they arrive on Site A and perform a conversion on Site B. Hence you need to pass the UTM parameters from your Site A to your Site B.

You have installed our AFL UTM Tracker plugin on Site A to capture the UTM parameters.

* Site A is powered by WordPress.

JavaScript Code

  1. Add the code below into your page footer HTML.
  2. Add your outbound URLs into the url_list array property.
  3. Edit the target_elements if you want to target specific DOM elements.