Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • At the top of the script, replace “YOUR-TRACKING-DOMAIN” with your Everflow tracking domain.

  • At the bottom of the script, replace “YOUR-AFFILIATE-ID” with your CRM affiliateId. If you are passing affId as a parameter to the page, then please remove this line. It is only necessary if affId is not passed to the page.

  • If you want to learn more about the Everflow SDK, see here.

  • If affid gets translated to “cc_custom_affid” in lines of code below, change line 23’s affiliate value to “cc_custom_affid” (excluding quotations)

Code Block
<script type="text/javascript" src="https://www.YOUR-TRACKING-DOMAIN.com/scripts/sdk/everflow.js"></script>
<script type="text/javascript">
   function updateURLParameter(url, param, paramVal){
	var newAdditionalURL = "";
	var tempArray = url.split("?");
	var baseURL = tempArray[0];
	var additionalURL = tempArray[1];
	var temp = "";
	if (additionalURL) {
	  tempArray = additionalURL.split("&");
	  for (var i=0; i<tempArray.length; i++){
		if(tempArray[i].split('=')[0] != param){
		  newAdditionalURL += temp + tempArray[i];
		  temp = "&";
		}
	  }
	}
	var rows_txt = temp + "" + param + "=" + paramVal;
	return baseURL + "?" + newAdditionalURL + rows_txt;
  }
  EF.click({
	offer_id: EF.urlParameter('oid'),
    affiliate_id: EF.urlParameter('affid'),
    sub1: EF.urlParameter('sub1'),
    sub2: EF.urlParameter('sub2'),
    sub3: EF.urlParameter('sub3'),
    sub4: EF.urlParameter('sub4'),
    sub5: EF.urlParameter('sub5'),
    uid: EF.urlParameter('uid'),
    source_id: EF.urlParameter('source_id'),
    transaction_id: EF.urlParameter('_ef_transaction_id'),
  }
		  ).then(function(transactionId){
	window.history.replaceState('', '', updateURLParameter(window.location.href, "c1", transactionId));
	window.history.replaceState('', '', updateURLParameter(window.location.href, "affId", "YOUR-AFFILIATE-ID"));
  }
				);
</script>

...