Table of Contents
Overview
Organic traffic are the users that reach your website directly, without the help of advertisements or partners.
Google Analytics is helpful for understanding your visitors, but Everflow gives you performance insights into the users that are converting on your website.
Use this setup to track performance from your direct traffic, identify any traffic coming from paid channels that you should start tracking as separate partners, and establish success metrics for evaluating the performance from your other partners and channels.
Product Guide
Learn more by checking out our interactive demo guide on this feature - [Click Here]
Code Logic
If user is not associated with a cookie, then the click will register as “organic”.
If user is associated with an "organic" cookie, and the same user clicks again, but this time using
affid
or_ef_transaction_id
in the query string, then a new cookie will be assigned to the associated affiliate.If the user clicks a second time, this time with a new
affid
or_ef_transaction_id
, then a new cookie will be assigned to the associated affiliate.If a user comes back to the site and doesn’t have an
affid
or_ef_transaction_id
value in their link and there is already a cookie (organic or regular affiliate) we will NOT set another cookie.
Please Note: We DO NOT automatically populate regular affiliate links with site data when the URL contains affid
or _ef_transaction_id
. We will only use the data sent in the Sub1-5 parameters from the click.
Non-Shopify Process
Create an Offer. We recommend naming the Offer according to the name of the company or product for which you are tracking activity.
For more information on creating an Offer - [Click Here]Create a partner. We recommend naming the Partner: "Organic"
For more information on creating a Partner - [Click Here]Replace the following values in the tracking code below:
INSERT_TRACKING_DOMAIN
= your tracking domainINSERT_OFFER_ID
= Offer ID of the offer created in Step 1INSERT_PARTNER_ID
= Partner ID of the partner created in Step 2""
= (Optional) Place website domain between quotation marks on line 8<script type="text/javascript"
src="https://INSERT_TRACKING_DOMAIN/scripts/sdk/everflow.js"></script>
<script type="text/javascript">
var EFOrganicPartner = INSERT_PARTNER_ID;
var EFOrganicOffer = INSERT_OFFER_ID;
var websiteDomain = "";
var isShopify = false;
function setCookie(name,value,days) {
var expires = "";
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days*24*60*60*1000));
expires = "; expires=" + date.toUTCString();
}
document.cookie = name + "=" + (value || "") + expires + ";domain=."+ websiteDomain +";path=/";
}
function getCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
var EFsub1 = "";
if (window.location.search.includes('fbclid')) {
EFsub1 = "Facebook"
if (EF.urlParameter('fbclid').slice(0, 3) === "PAA") {
EFsub1 = "Instagram"
}
};
if (window.location.search.includes('gclid')) {
EFsub1 = "Google"
};
if (window.location.search.includes('ttclid')) {
EFsub1 = "Tiktok"
};
if (window.location.search.includes('MSCLKID') || window.location.search.includes('msclkid')) {
EFsub1 = "Microsoft"
};
if (window.location.search.includes('OutbrainClickId')) {
EFsub1 = "Outbrain"
};
if (window.location.search.includes('TCLID')) {
EFsub1 = "Taboola"
};
var OrganicClick = true
if (EF.urlParameter('affid') || EF.urlParameter('_ef_transaction_id')) {
OrganicClick = false
}
var clickObject = {
affiliate_id: EF.urlParameter('affid'),
offer_id: EF.urlParameter('oid'),
sub1: EF.urlParameter('sub1'),
sub2: EF.urlParameter('sub2'),
sub3: EF.urlParameter('sub3'),
sub4: EF.urlParameter('sub4'),
sub5: EF.urlParameter('sub5'),
source_id: EF.urlParameter('source_id'),
transaction_id: EF.urlParameter('_ef_transaction_id')
};
var OrganicClickObject = {
affiliate_id: EFOrganicPartner,
offer_id: EFOrganicOffer,
sub1: EF.urlParameter('sub1') || EFsub1,
sub2: EF.urlParameter('sub2') || document.referrer,
sub3: EF.urlParameter('sub3') || '/'+window.location.pathname.split('/')[1],
sub4: EF.urlParameter('sub4') || window.location.pathname,
sub5: EF.urlParameter('sub5') || window.location.search,
source_id: EF.urlParameter('source_id') || "organic",
transaction_id: EF.urlParameter('_ef_transaction_id')
}
function shopifyEfClick(object) {
if (websiteDomain !== "") {
EF.configure({tld: websiteDomain });
}
EF.click(object).then(function (transaction_id) {
var payload = {};
if (transaction_id) {
payload['attributes[eftid]'] = transaction_id;
}
if (EF.urlParameter('oid') && EF.urlParameter('affid')) {
payload['attributes[oid]'] = EF.urlParameter('oid');
payload['attributes[affid]'] = EF.urlParameter('affid');
}
$.ajax({
type: 'POST',
url: '/cart.js',
data: payload,
success: function (d) { console.log('Updated cart', d)},
dataType: 'json'
});
})
}
function EfClick(object) {
if (websiteDomain !== "") {
EF.configure({tld: websiteDomain });
}
EF.click(object)
}
if (!OrganicClick) {
isShopify ? shopifyEfClick(clickObject) : EfClick(clickObject)
setCookie('efOrganic','false', 90)
} else if(!getCookie('efOrganic')) {
isShopify ? shopifyEfClick(OrganicClickObject) : EfClick(OrganicClickObject)
setCookie('efOrganic','true', 90)
}
</script>
Shopify Process
Create an Offer. We recommend naming the Offer according to the name of the company or product for which you are tracking activity.
For more information on creating an Offer - [Click Here]Create a partner. We recommend naming the Partner: "Organic"
For more information on creating a Partner - [Click Here]Replace the following values in the tracking code below:
INSERT_OFFER_ID
= Place the Offer ID of the offer created in Step 1.INSERT_PARTNER_ID
= Place the Partner ID of the partner created in Step 2.""
= (Optional) Place website domain between quotation marks on line 3.var EFOrganicPartner = INSERT_PARTNER_ID;
var EFOrganicOffer = INSERT_OFFER_ID;
var websiteDomain = "";
var isShopify = true;
function setCookie(name,value,days) {
var expires = "";
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days*24*60*60*1000));
expires = "; expires=" + date.toUTCString();
}
document.cookie = name + "=" + (value || "") + expires + ";domain=."+ websiteDomain +";path=/";
}
function getCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
var EFsub1 = "";
if (window.location.search.includes('fbclid')) {
EFsub1 = "Facebook"
if (EF.urlParameter('fbclid').slice(0, 3) === "PAA") {
EFsub1 = "Instagram"
}
};
if (window.location.search.includes('gclid')) {
EFsub1 = "Google"
};
if (window.location.search.includes('ttclid')) {
EFsub1 = "Tiktok"
};
if (window.location.search.includes('MSCLKID') || window.location.search.includes('msclkid')) {
EFsub1 = "Microsoft"
};
if (window.location.search.includes('OutbrainClickId')) {
EFsub1 = "Outbrain"
};
if (window.location.search.includes('TCLID')) {
EFsub1 = "Taboola"
};
var OrganicClick = true
if (EF.urlParameter('affid') || EF.urlParameter('_ef_transaction_id')) {
OrganicClick = false
}
var clickObject = {
affiliate_id: EF.urlParameter('affid'),
offer_id: EF.urlParameter('oid'),
sub1: EF.urlParameter('sub1'),
sub2: EF.urlParameter('sub2'),
sub3: EF.urlParameter('sub3'),
sub4: EF.urlParameter('sub4'),
sub5: EF.urlParameter('sub5'),
source_id: EF.urlParameter('source_id'),
transaction_id: EF.urlParameter('_ef_transaction_id')
};
var OrganicClickObject = {
affiliate_id: EFOrganicPartner,
offer_id: EFOrganicOffer,
sub1: EF.urlParameter('sub1') || EFsub1,
sub2: EF.urlParameter('sub2') || document.referrer,
sub3: EF.urlParameter('sub3') || '/'+window.location.pathname.split('/')[1],
sub4: EF.urlParameter('sub4') || window.location.pathname,
sub5: EF.urlParameter('sub5') || window.location.search,
source_id: EF.urlParameter('source_id') || "organic",
transaction_id: EF.urlParameter('_ef_transaction_id')
}
function shopifyEfClick(object) {
if (websiteDomain !== "") {
EF.configure({tld: websiteDomain });
}
EF.click(object).then(function (transaction_id) {
var payload = {};
if (transaction_id) {
payload['attributes[eftid]'] = transaction_id;
}
if (EF.urlParameter('oid') && EF.urlParameter('affid')) {
payload['attributes[oid]'] = EF.urlParameter('oid');
payload['attributes[affid]'] = EF.urlParameter('affid');
}
$.ajax({
type: 'POST',
url: '/cart.js',
data: payload,
success: function (d) { console.log('Updated cart', d)},
dataType: 'json'
});
})
}
function EfClick(object) {
if (websiteDomain !== "") {
EF.configure({tld: websiteDomain });
}
EF.click(object)
}
if (!OrganicClick) {
isShopify ? shopifyEfClick(clickObject) : EfClick(clickObject)
setCookie('efOrganic','false', 90)
} else if(!getCookie('efOrganic')) {
isShopify ? shopifyEfClick(OrganicClickObject) : EfClick(OrganicClickObject)
setCookie('efOrganic','true', 90)
}
Be sure to enable reconciliation in your Shopify integration and click Save.
Then, go back into the integration to edit the click script. Replace it with the code from Step 3.
Use this guide to determine what values to pass in the Sub1-5 parameters:sub1: if an ad is used in TikTok, Facebook, Instagram, Google, Microsoft (Bing), Taboola, Outbrain. N/A means it wasn't from one of those sources.
sub2: referrer url
sub3: the page that the user is on prior to entering your site
sub4: sub-section of the page that the user is on prior to entering your site
sub5: query string (everything after the ? in the URL)
NEED HELP? OUR CUSTOMER SUCCESS TEAM IS HERE FOR YOU!
We've assembled a superstar team of industry veterans that are available around the clock to make sure that your issues are resolved and questions are answered. You can reach out any time in-platform via Chat or by emailing support@everflow.io.