# Everflow

Everflow and Checkout Champ work nicely together in a just a few easy steps. There are generally 2 types of Everflow integrations - a direct tracking string to your page OR a dynamic assignment on the page.

#### **Direct** <a href="#everflow-direct" id="everflow-direct"></a>

Follow these [instructions](https://help.checkoutchamp.com/checkoutchamp-help-desk/plugins/affiliate-systems/everflow-integration). There is no additional work needed on your pages.

#### **Assign Transaction ID on the page** <a href="#everflow-assigntransactionidonthepage" id="everflow-assigntransactionidonthepage"></a>

Step 1: Dynamically assign the Transaction ID on your page

Edit the first page(s) of your funnel. A first page is any page that you will route traffic to from an outside source.

Go to the code editor

<figure><img src="https://3790748257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT43PzcNjyZtWby9yrGd3%2Fuploads%2FtELnclAzj6yiB2sk2fFH%2Fimage.png?alt=media&#x26;token=96fed2af-1c6a-484b-ad65-f3f9af54fd0a" alt=""><figcaption></figcaption></figure>

Add the below script in the Head section of HTML.

* 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](https://developers.everflow.io/docs/everflow-sdk/).
* 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)

```javascript
<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>
```

Step 2: Setup the Postback URL. Follow the “Setting up your Postback URL in CheckoutChamp” steps [here](https://konnektive.atlassian.net/wiki/spaces/CC/pages/2098037680/Everflow+Integration#Setting-up-your-Postback-URL-in-Checkout-Champ).

If you are using a direct API integration instead of Checkout Champ, place the script on the page as in Step 1 and then call the Import Click API to save the affiliate values.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.checkoutchamp.com/funnel-builder/creating-and-editing-funnels-pages/funnel-visualizer-and-page-builder/funnel-visualizer/edit-funnel-settings/affiliates/everflow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
