Skip to main content
All CollectionsPHP and Javascript Node ExamplesPHP Nodes
Offer Rotation Waterfall using a PHP Node
Offer Rotation Waterfall using a PHP Node

How to make clicks rotate to one offer until some limit

Zeno avatar
Written by Zeno
Updated over a week ago

Here's the scenario:

  • You have multiple offers

  • You want all visits to initially go to offer 1 until some limit is hit, e.g. 1000 clicks (not conversions -- this isn't conversion-based capping)

  • After that you want clicks to cascade over to offer 2

  • Then offer 3

  • Then some default

This is great for testing new offers where you want to prioritise getting data to offers in some order, or if you have lifetime caps.

This does not reset daily -- for that its better to use a condition node with conversion-based rules.

A funnel using this feature would look like this:

Where route 64 is the default URL after all other routes have been fulfilled.

For each outgoing node (except the default URL), you will need a custom token in the funnel settings.

For example, for these 3 nodes above, add these custom tokens:

fulfillment_clicks_route_1=300
fulfillment_clicks_route_2=500
fulfillment_clicks_route_3=100

  • This means that the node connected to route 1 will receive 300 clicks

  • The next one will get 500

  • And the 3rd one will get 100

After that, all remaining clicks will go through route 64.

If you edit one of the connected external URL nodes and set a new URL, then it will reset the counter for that specific route.

If you disconnect a route and connect it to a new node, it will reset the counter for that route as well.

Here is the code to paste in the PHP node:

If you have any issues with this code, do let us know!

Did this answer your question?