Open an offer link in a new tab and show a push subscription request in the old one
Use case: A user clicks on a final button that redirects to the offer. The offer opens in a new browser tab. When the user goes back to the old tab where your landing page was, they get a push subscription request.
Integrate the Pushflow script according to the standard instructions.
Next, we add a
toOffer function, which will open the offer in a new tab and set a cookie that the user has gone to the offer. Next, we check the
onfocus event and when the user has opened the tab again we check if our cookie is there, and if it's true we request a push subscription:
In the script above, change
https://trackdomain.com/click.php?lp=1 to a link to your offer.
Ask for a push subscription before redirecting from a landing page to an offer
Use case: A user has reached the end of your landing page and clicks on a final button before redirect to an offer and a push subscription request appears. Regardless of whether the user subscribes or not, they are redirected to your offer.
Create a feed and in a section "Redirects settings" in each field, specify a link to your offer, for example, if your tracker is Binom and you use external landing pages, then in each field there will be a link:
http://trackdomain.com/click.php?lp=1 or if you use integrated landing pages:
Next, we need to create a function that, instead of redirecting to the offer, will make a push subscription request and then a Pushflow script will redirect to the offer. Copy the code below into the
Next, find the button where the link to the offer is located and add an onclick event: