Domains Configuration
The Everflow SDK is served from your account’s tracking domain, which makes it simple to use. You simply need to add :
<script type="text/javascript"
src="https://www.YOUR-TRACKING-DOMAIN.com/scripts/sdk/everflow.js"></script>
to your page before you can use the features documented here. This is enough for the vast majority of cases.
However, there are scenarios where the configuration can require additional efforts.
Multiple Everflow Accounts
In a typical scenario where a single Everflow account generates a click on a page, there is no need to “identify” the account responsible for the click. The information is inferred from the <script>
tag used to include the Everflow SDK. For example :
<script type="text/javascript"
src="https://www.TRACKING-DOMAIN-A.com/scripts/sdk/everflow.js"></script>
<script>
// This click will be attributed to the account that owns "www.TRACKING-DOMAIN-A.com"
EF.click({
offer_id: 1,
affiliate_id: 1
});
</script>
Situations may come up where multiple Everflow customers wish to generate a click on the same page (multi-tenant scenarios). The EF.click
function takes an optional tracking_domain
parameter that can be used to associate clicks with specific accounts, regardless of the account that originally imported the script on the page.
<script type="text/javascript"
src="https://www.TRACKING-DOMAIN-A.com/scripts/sdk/everflow.js"></script>
<script>
// This click will be attributed to the account that owns "www.TRACKING-DOMAIN-A.com"
EF.click({
tracking_domain: "https://www.TRACKING-DOMAIN-A.com",
offer_id: 1,
affiliate_id: 1
});
// This click will be attributed to the account that owns "www.TRACKING-DOMAIN-B.com"
EF.click({
tracking_domain: "https://www.TRACKING-DOMAIN-B.com",
offer_id: 50,
affiliate_id: 17
});
</script>
This also gives you the freedom to extract the offer id / affiliate id information from different URL parameters for different accounts should the need arise. A landing page reached via https://landing-page.com?oid=1&affid=2&offer=10&affiliate=17
could lead to :
<script type="text/javascript"
src="https://www.TRACKING-DOMAIN-A.com/scripts/sdk/everflow.js"></script>
<script>
EF.click({
tracking_domain: "https://www.TRACKING-DOMAIN-A.com",
offer_id: EF.urlParameter('oid'),
affiliate_id: EF.urlParameter('affid')
});
EF.click({
tracking_domain: "https://www.TRACKING-DOMAIN-B.com",
offer_id: EF.urlParameter('offer'),
affiliate_id: EF.urlParameter('affiliate')
});
</script>
Important : Subdomains must always be specified when using the tracking_domain
parameter as apex domains are considered invalid. Use tracking_domain: "www.domain.com"
, not tracking_domain: "domain.com"
Cookies, Subdomains and Attribution
The Everflow SDK uses different methods to make the attribution as reliable as possible. For that reason, first party cookies created on the domain where the clicks are initially generated. Information is later extracted from that cookie when a conversion occurs. This requires the cookie to be accessible when the EF.conversion(...)
code ultimately runs.
When the click occurs on a subdomain that differs from the one where the conversion occurs, the cookie may not be accessible. For example :
- User lands on
https://shop.your-store.com
which generates a click - The Everflow SDK first party cookies the browser using the
shop.your-store.com
domain - User decides to make a purchase and is redirected to
https://payment.your-store.com
- User completes the purchase, which generates a conversion (from
https://payment.your-store.com
) - The Everflow SDK cannot get access to the first party cookie since it is stored on a different subdomain. It must rely on a different attribution mechanism
In such a scenario, it is preferable to store the cookie on the top level domain (your-store.com
) rather than on a subdomain (shop.your-store.com
) to avoid attribution problems. This is done by using the EF.configure
method. In the scenario described above the click code would look like so :
<script type="text/javascript"
src="https://www.YOUR-TRACKING-DOMAIN.com/scripts/sdk/everflow.js"></script>
<script>
EF.configure({
tld: "your-store.com" // Top level TLD without http(s)
});
EF.click({
offer_id: 5,
affiliate_id: EF.urlParameter('affid')
});
</script>
The conversion code would then make use of the same method to fetch the cookie more reliably, regardless of which subdomain the page lives on :
<script type="text/javascript"
src="https://www.YOUR-TRACKING-DOMAIN.com/scripts/sdk/everflow.js"></script>
<script>
// The EF.conversion code will look through all cookies, including the one set at the top level TLD
EF.conversion({
offer_id: 5
});
</script>