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:
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.
- Marketing website:
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:
Meaning the full
<script> tag would look something like this:
<script data-domains="get-example.com, example.io" data-rewardful="<API-KEY>" src="https://r.wdfl.co/rw.js" async></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:
Any query parameters already present in link's URL will be preserved, for example:
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.combut 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.comredirects visitors to
referralUUID and append it to the redirect URL.