All Collections
Frequently Asked Questions
Does Rewardful track referred visitors across domains?
Does Rewardful track referred visitors across domains?
Kyle Fox avatar
Written by Kyle Fox
Updated over a week ago

Important: The Rewardful <script> tag must be installed on all subdomains and domains that you wish to track across. If you experience issues setting up cross-subdomain or cross-domain tracking, please verify that the tag is present on every page of every domain.

Tracking between subdomains

Rewardful automatically tracks across subdomains, provided that the Rewardful <script> tag is properly installed on each subdomain. There is no extra work required to enable cross-subdomain tracking.

Example: A common scenario is to have your marketing website and application running on different subdomains:

  • Marketing website: www.example.com 

  • Application: app.example.com 

This allows you to use www.example.com as your Campaign URL, meaning affiliates will have links such as www.example.com?via=james-bond. Visitors who arrive at www.example.com?via=james-bond and then sign up at app.example.com/signup will be correctly attributed to that affiliate.

Tracking between domains

Due to the limitations of how browser cookies work, some extra work is required to enable cross-domain tracking with Rewardful. Cross-domain tracking is a feature included in our Growth and Enterprise plans.

Example:

  • Marketing website: www.get-example.com 

  • Application: app.example.io 

To enable correct attribution as visitors browse between these two domains, add a data-domains attribute to the Rewardful <script> tag. This attribute should be a comma-separated list of the domains you want to track across.

In this example, the attribute would be:

data-domains="get-example.com, example.io"

Meaning the full <script> tag would look something like this:

<script async src="https://r.wdfl.co/rw.js" data-rewardful="<API-KEY>" data-domains="get-example.com, example.io"></script>

Note: If you copy the code above, be sure to replace <API_KEY> with your Rewardful API key.

How it works

When you include the data-domains attribute, the Rewardful script will add a referral=<UUID> query parameter to outgoing links to these domains. This query parameter uniquely identifies the visitor as they click between domains.

For example, if a referred visitor has landed on www.get-example.com, any links on that page which lead to example.io will have the query parameter added:

example.io/signup
becomes → example.io/signup?referral=<SOME-UUID> 

Any query parameters already present in link's URL will be preserved, for example:

example.io/signup?utm_source=facebook
becomes → example.io/signup?utm_source=facebook&referral=<SOME-UUID> 

Limitations

Cross-domain tracking works well when visitors navigate between your domains by clicking the rewritten links.

However, it will not work for some other navigation methods, such as:

  • A visitor clicks an affiliate link to get-example.com but then later on navigates directly to to example.io — either by manually typing the URL into their browser, clicking a direct link from an email, etc.

  • Your website at get-example.com redirects visitors to example.io via JavaScript or 301/302 redirects. If you wish to enable cross-domain tracking when performing redirects, we recommend using our JavaScript API to obtain the referral UUID and append it to the redirect URL.

Did this answer your question?