Conversion tracking options

Conversions are events that create revenue.

They can only occur on offer pages, but a conversion for any visitor will also attribute backward to pages/nodes they visited before converting on an offer (so you can still see what landers may have lead to conversions).

There are two ways to track conversions:

  1. Using a postback URL
  2. Using our JavaScript

I'll go through both options below.


Conversion tracking using a postback URL

A postback URL is very simple -- its just a URL that gets loaded by some system, such as your offer network, another tracking platform, some code in an app/page, or even you in a browser.

They are very simple in nature. You load the URL as a way of passing some info, they get received, and that's it!

There are two postback methods you can use.

Method 1 - Traditional, Single Hit ID

You can find the FunnelFlux Pro global postback URL under system settings:

https://DOMAIN/pb/?hit=REPLACE&tx=REPLACE&rev=REPLACE
  • hit = a unique hit ID (required)
  • tx = an optional transaction ID
  • rev = optional conversion revenue (if none passed, we will use the default payout defined in the offer's configuration)

For this to work you need to pass a Hit ID, which is a unique tracking ID that we generate for every visit to any node in a funnel. So a single visitor (who has a single VID) will make a different hit ID for every node they touch.

When someone visits an Offer Page, we want to get the hit ID generated for that page and pass it back when a conversion happens.

The simplest way to do this is by changing your offer to pass our hit to them using the token {hit}. In most cases, with affiliate networks, this will mean passing something like ...&clickid={hit}... in the URL.

Then in the postback URL configured in your network, you would pass that data back, using something like this:

https://DOMAIN/pb/?hit={{clickid}}&tx={{transaction}}&rev={{payout}}

Keep in mind this is just an example -- the parameter to pass hit ID under and the tokens to use in the postback will depend on the third-party system. Use our offer source templates to guide you here.

If you are using a custom system or your own self-developed funnels, its up to you to capture this hit ID and then pass it back in a postback URL when conversions happen.


Method 2 - Session-based VID

If you can't capture a single unique hit ID for a specific page, but can capture the visitor ID (VID) of a user, then you can use this for conversions as well.

VID is a unique identifier for a user/session. We always return this in our JS response, add it automatically to redirect destinations, and try to automatically pass it into action links.

Often it may be easier to capture this at the beginning of a visitor journey and not worry about some hit on some specific page, especially with Ecommerce-related platforms.

What you can do instead is pass back the VID in the postback URL, as well as either the page ID that converted, or a product ID -- these product IDs are configured in the "Integration Product IDs" section of an offer.

So, your postback URL can be:

https://DOMAIN/pb/?vid=REPLACE&p=REPLACE&tx=REPLACE&rev=REPLACE

When you pass data like this, we will find that VID/user, then find the most recent hit ID for that page ID.


Using Visitor ID vs Hit ID

There are a few pros/cons to capturing and using visitor ID or hit ID for postback-based conversion tracking.

For visitor ID:

  • It's easier to capture in general given our JS always has it and our redirects always add it
  • It is a single visitor identifier, so is much easier to store in CRMs and Ecom systems
  • This also makes it a lot more useful when you have flows with upsells/multiple offers, where you want to store one user ID and send multiple conversion events
  • You don't need to capture different IDs on different offer pages and ensure they get stored/used correctly
  • However, VID data gets looked up from our session storage, which is not permanent. These sessions last for 4 days by default, 28 days if you are using linked funnels, and they automatically extend when getting activity. So while you could store this value in a CRM, it won't work if you fire some random conversion 6 months later with no previous activity.
  • Additionally, with VID, you must also pass a page ID value to say what offer converted -- else it will use the last visited offer for that user's session
  • If you are using linked funnels to link user journey and track LTV, you need to capture VID anyway

For hit ID:

  • It's simple in traditional affiliate scenarios to pass a single unique click ID, then pass it back to another system
  • No need to specify another value like page ID, as hit IDs are already unique to a specific page visit
  • Hits are stored forever in our analytics DB, so can be converted at any time in the future
  • Unlike VID however, you can't use a hit to convert different pages for a visitor, so they are less ideal if you have many pages/offers and some CRM system

If in doubt, just reach out and we can help clarify any questions about postback tracking.


Conversion tracking using JavaScript

The second way you can track conversions is using JavaScript.

Go to any offer > edit > conversion tracking. This will give you the code for firing a conversion event, which is our universal tag followed by a flux.track event like this:

<!-- FF Pro Conversion Event -->
<script>
 flux.track("conversion",{rev:"VALUE"})
</script>

Here you can replace the revenue value with your own, or leave it blank to use the offer's default.

As it is, this code will convert the most recently visited offer view. If you want to force a specific page ID you can pass the p parameter, and you can also force a specific vid or hit (don't pass both). You may also pass a transaction ID with the tx parameter (all inside the object that is the second argument in the function above -- the stuff inside curly brackets).


Getting data directly from our JavaScript

In some cases you may not be able to use postback URLs or redirects, but could capture data on your side such as Hit ID / VID to use in later tracking.

You can retrieve all of this from our JavaScript directly. To do this, you should:

  • Define the extra tokens you would like to return in the optional fluxOptions data - LINK
  • Then use a JS event listener and/or our flux.get method to retrieve that data once available - LINK

So for example, you could tell the JS to return hit ID, city, and current funnel ID like this:

<!-- Optional tracking option overrides -->
<script>
var fluxOptions = {
  urlRewrite: true,
  actionLinkRewrite: true,
  cookieAllowed: true,
  resolveTokens: ['{hit}','{country-name}','{funnel-id}'],
  isActive: true
};
</script>

When the Javascript view event processed, the typical response will include a payload of data, for example:

{
    "error": "",
    "resolvedTokens": {
        "{hit}": "33kt2mzzct9rwnnhqt02w1",
        "{visitor}": "efyKb5Wz2qfz5gAUalpgwpiMgDx",
        "{current-node-id}": "0XJbzUwQYEWa"
    },
    "skv": "vid"
}

When you request other tokens, they will appear here. You can ingest this data as you please, or use flux.get('{token}') to get the corresponding token value returned.

You need to do this only once the JS request has a response, so an event listener is ideal (which must go before our tracking JS). For example:

document.addEventListener('fluxView', function(){
  console.log('Flux view completed')
  let countryName = flux.get('{country-name}')
  //now do something with countryName on your page
})
Was this article helpful?