Create smooth tracking using Session ID
Use the session ID when a visitor’s identity is lost and they show up as organic traffic, or when the journey has to continue from another device or location.
Each session ID belongs to one funnel.
Session data is kept in PHP session files on the tracker, and the server’s session clean-up removes old files.
On a standard Ubuntu 24.04 install that clean-up allows 3 days (session.gc_maxlifetime = 259200).
The JavaScript can pass the session ID for you. In the funnel editor, right-click a lander, offer or external URL node, choose Send Traffic Here, turn on Use direct tracking and copy the Universal tracking script.
Browsers, operating systems, and large traffic sources such as Facebook have tightened tracking controls. That makes it harder to follow a visitor from page to page, even when the tracking is anonymous.
When tracking breaks:
- Action links do not send the visitor to the right destination.
- Tracking data disconnects from the visitor, so profitability and traffic-source reports are incomplete.
- Action links on landers fail, and that revenue is lost.
If you already know how the tracker identifies a visitor, skip to Basic implementation.
How FunnelFlux tracks visitors
Section titled “How FunnelFlux tracks visitors”A typical funnel is a traffic node, a pre-sell lander, a main lander, then an offer. The campaign, on Facebook in this example, sends visitors to the traffic node with a FunnelFlux redirect link.
When the visitor clicks the ad and loads the tracking link:
- FunnelFlux records an entrance to the funnel.
- The visitor gets a unique visitor ID.
- FunnelFlux starts a session for that visitor. The session has a session ID. The session file is stored locally so it can be read quickly. It is a temporary file, not a row in the analytics database.
- The first lander view is a hit with its own hit ID.
- That data is written to the session file and to a cookie on the visitor’s browser.
The cookie is the only thing on the visitor’s side that tells the tracker who they are.
What happens on an action click
Section titled “What happens on an action click”On the landing page the visitor has a visitor ID, a hit ID for that page view, and a session ID. Hit IDs exist for every node the visitor touches. They should also have the cookie.
An action link has one of these forms:
https://domain.com/?flux_action=1https://domain.com/?flux_action=1&flux_f=xxx&flux_ffn=xxxFunnelFlux reads the cookie for that domain first. The cookie supplies the visitor ID and the node they are leaving. That is how the tracker chooses the next node.
A click moves the visitor from node A to node B. The next action click would then leave node B for node C, if node C exists.
Multiple action links, or links that open in a new tab, are different. A second click should still leave node A, not node B. The tracker uses the referrer to see that the click still came from the original lander.
The tracker needs both of these:
- The cookie set on the initial redirect, or by the JavaScript when the page loads
- The referrer on the action click
Either one can be missing. That is where tracking breaks.
Where tracking breaks: the referrer
Section titled “Where tracking breaks: the referrer”If a lander or offer has more than one action link, or those links open in a new tab, the action link has to receive the referrer.
Two common failures:
rel="noreferrer"on the action link. Do not add it. It hides the referrer from your own tracker.- An HTTPS page linking to an HTTP action URL. Most browsers will not send the referrer to the insecure URL.
rel="noopener" is fine.
Use HTTPS for the tracker and the pages. Some browsers, including recent Chrome, mark HTTP pages as not secure.
Some browsers blank the referrer on every link. Firefox Private Mode is one example. The methods on this page still apply in that case.
Cookies fail too: they are tied to a domain, and browsers and privacy plugins block them. Using cookieless tracking covers cookie failures and how to track without cookies.
Passing the visitor’s identity on the link
Section titled “Passing the visitor’s identity on the link”The reliable methods use the no-redirect JavaScript. You can put it on a page whether the visitor arrived through a tracking redirect or directly. The two work together. The no-redirect JavaScript is also how you record time on page.
The visitor is still identified by a session, a cookie, a visitor ID, or a hit ID. Pass that identity on the action link, and the tracker knows who clicked and where they came from even when the referrer and the cookie are missing.
Two ways to pass it:
- Append the session ID to action links.
- Append the hit ID to action links.
The session ID says who the visitor is, which funnel they are in, and the last page they landed on. It works like a visitor ID. The hit ID says which node visit the action click came from. You use them in almost the same way. Both are covered in Session ID or hit ID below.
Basic implementation
Section titled “Basic implementation”Put the Universal tracking script in the <head> of the landing page.
The call at the bottom looks like this:
fflux.track({ timeOnPage: false, timeOnPageResolution: 3000, noCookies: false, tokenInjection: { intoUrl: false, intoForms: { selector: null }, intoLinks: { selector: null }, tokens: {} }});Point the link injector at your action links and tell it to append the session ID:
fflux.track({ timeOnPage: false, timeOnPageResolution: 3000, noCookies: false, tokenInjection: { intoUrl: false, intoForms: { selector: null }, intoLinks: { selector: 'a.flux_cta' }, tokens: { flux_sess: '{session-id}' } }});Add the class flux_cta to each action link so the injector can find it.
Change:
<a href="https://tracker.com/?flux_action=1">Some text</a>to:
<a class="flux_cta" href="https://tracker.com/?flux_action=1">Some text</a>After the page loads, the JavaScript rewrites those links to include the session value:
https://tracker.com/?flux_action=1&flux_sess=xxxxxxxxxxxxxxThe action click then carries the session even if the referrer is blocked and no cookie is available.
Session ID or hit ID
Section titled “Session ID or hit ID”Appending the session ID
Section titled “Appending the session ID”Advantages:
- Session data is in local files, so the redirect stays fast.
- The session file is available as soon as the JavaScript has run, so a fast clickthrough still works.
Disadvantage:
- If the page has many action links, or the visitor clicks them more than once, and the referrer is also missing, the session ID cannot tell the tracker that those repeat clicks still came from the original lander.
Use the session ID on simple landers that do not have multiple actions, and where the visitor may click through quickly.
Appending the hit ID
Section titled “Appending the hit ID”Use the same injection. Change:
tokens: { flux_sess: '{session-id}' }to:
tokens: { flux_hid: '{hit-id}' }Advantage:
- The hit ID belongs to that exact lander visit. The visitor can click as many action links as they want, presuming they open in new tabs, and each click still follows the correct action from that node.
Disadvantages:
- The hit ID is stored in the tracker database, not in the local session file. The method fails if that hit has not been written to the database yet.
- The write can take a few seconds, and server load or other technical delays can make it longer. A very fast click can pass a hit ID that is not in the database yet, and tracking breaks.
Use the hit ID on complex pages, such as offer walls, or when one page has many action links to different landers or offers.
Do not pass the session ID and the hit ID on the same click.
If you do not want to use the JavaScript, put {session-id} or {hit-id} in the lander URL in FunnelFlux, read that value in your own code, and write it into the links on the page.
See Using PHP for an example.
Continuing a session from somewhere else
Section titled “Continuing a session from somewhere else”A tracking session lasts as long as the server keeps its session file (3 days on a standard install, see above).
flux_sess resumes that session inside the same funnel.
It is not a substitute for the visitor ID, which you pass as flux_visitor when you want lifetime revenue from one funnel to another.
You can also pass the session ID so a visitor can re-enter after leaving, or from another device or IP.
Example 1: a visitor returns from a site you do not control
Section titled “Example 1: a visitor returns from a site you do not control”The visitor enters the funnel and submits a form that sends them to another site. When that site sends them back, they should still be the same visitor, with the original tracking fields.
Pass the session ID to that system with the link injector, or put the {session-id} token in the lander or offer URL in FunnelFlux.
When the system sends the visitor back, it must add flux_sess=THE_ID to an action link or an entrance link.
The journey continues from where it stopped.
This is more reliable than passing only the visitor ID. A visitor ID does not stop a new entrance, and it does not guarantee that the original tracking data comes with them.
Example 2: an email follow-up inside the same funnel
Section titled “Example 2: an email follow-up inside the same funnel”The lander has an opt-in form, and the follow-up email sends the visitor to another page or node in the same funnel.
The session ID lets that visit continue the session, including from another device.
Inject a hidden field into the form:
fflux.track({ timeOnPage: false, timeOnPageResolution: 3000, noCookies: false, tokenInjection: { intoUrl: false, intoForms: { selector: 'form.form_class' }, intoLinks: { selector: null }, tokens: { flux_sess_funnelName: '{session-id}' } }});That writes a hidden field named flux_sess_funnelName into the form with class form_class.
- Set the selector to the form you mean, such as
formorform.class. - Name the field something the email system will store on the contact. Include the funnel name in the field name if you do this for more than one funnel.
After the submit, the contact in the email system has a session ID stored on that field.
Use the email system’s own personalisation token in the call-to-action URL:
https://tracker.com/...&flux_sess=##flux_sess_funnelName##You can track the email itself in FunnelFlux, using a lander that represents the email. A flow for that looks like this:
![]()
To track opens, embed an entrance link as a 1-pixel image and include flux_sess.
Many email clients block remote images, so open tracking from this pixel is unreliable.
<img src='https://tracker.com/?flux_fts=xxx&flux_fn=xxx&flux_sess=##SOME_PERSONALISATION##' alt='' width='1' height='1' />For the call to action, use the action link from the email node to lander 2, with the organic parameters and the session ID:
https://tracker.com/?flux_action=1&flux_f=xxx&flux_ffn=xxx&flux_sess=##SOME_PERSONALISATION##That action link sets the funnel ID and the node the click comes from, so the click is a clickthrough from the email. Passing the existing session again stops FunnelFlux from creating a new entrance.
Navigation without action links
Section titled “Navigation without action links”Session ID can also connect pages when you cannot replace the site’s own links with FunnelFlux action links. Shopify and ClickFunnels are typical cases.
Put the Universal tracking script on the pages. In FunnelFlux, create landers and offers whose URLs match the pages visitors actually open. Pass the session ID so FunnelFlux continues the journey instead of starting a new one.
Without that, the JavaScript creates a new entrance each time. Referrer alone cannot tell an organic visit from a click inside the current funnel, or from a page in a different funnel.
Inject the session ID into ordinary links:
fflux.track({ timeOnPage: false, timeOnPageResolution: 3000, noCookies: false, tokenInjection: { intoUrl: false, intoForms: { selector: null }, intoLinks: { selector: 'a' }, tokens: { flux_sess: '{session-id}' } }});The selector a adds flux_sess to every link on the page.
Narrow the selector if you only want some links.
A click from page A to page B is then tracked as a view of page B, not as a new entrance.
Email to a different funnel
Section titled “Email to a different funnel”Use the session ID only when the email sends the visitor to a node in the same funnel the session came from.
Do not pass that session as flux_sess if the follow-up is in a different funnel.
The session is not valid there.
Pass the visitor ID into the form instead, and add flux_visitor=ID to the entrance or action links in the email sequence.
That connects the visitor to the original funnel, so you can see lifetime revenue and indirect conversions.
Using PHP
Section titled “Using PHP”PHP is useful here only if you use tracking links and you need to avoid the JavaScript.
Put the {session-id} token in the lander or offer URL in FunnelFlux.
Read it from the query string and write it into the links on the page.
The query parameter name below is whatever you used in that URL:
<a href="https://tracker.com/?flux_action=1&flux_sess=<?= urlencode($_GET['param'] ?? '') ?>">Some text</a>The JavaScript methods cover most of the same cases.

