07 - Using Redirect Hooks

ClickerVolt allows you to execute custom PHP, HTML or Javascript code before a tracking link redirects a visitor.


These are called "On Redirect" hooks, and can be found in the "Hooks" tab of your links:



While PHP hooks are for advanced users, HTML/Javascript ones can easily be used for multiple purposes, like adding your retargeting pixels or displaying some HTML content before redirects happen (loading messages for example).


Clicking the "Add "On Redirect" Hook" button adds a new panel where you can select which hook action you want to add.


The HTML/Javascript hooks look like this:



An editor window allows you to enter any HTML/Javascript code to be executed.


In addition, you can enter the display duration in milliseconds. Your HTML/Javascript code will be displayed for that amount of time, before the visitor gets redirected to one of your link's target URLs.


For retargeting pixels, I recommend to leave this value to 1000 ms (1 second) - to be sure the visitor gets cookied. Especially for Facebook retargeting, as their pixel is relatively slow to fully load.


If your link uses the Cloaked redirect mode, then this duration option is ignored as your HTML/Javascript hooks are all embedded in the cloaked page.


The PHP hooks look similar but don't have that display duration option, as there is nothing shown to the visitor when these hooks are executed.



For each link, you can add an unlimited number of hooks.