Its possible create a Rule that wait 1 sec before redirect?

Its possible create a Rule that wait 1 sec before redirect ?

i need the page rule wait 1 sec before redirect

I need my pixel activate before redirect the user to another domain

A rule, not that I am aware of, but feel free to set up a Worker that does that.

1 Like

i don’t know what is a worker, can you tell me how can i set up a worker to do that ?
i just need wait 1 second and then redirect the user to another page.

I can link Cloudflares really good documentation, which perfectly describes what Workers are: https://developers.cloudflare.com/workers/

This allows you to do way more than what normal PageRules do. You can specify a path/URL on which, a by you defined function is then getting executed.

If you want to redirect from an existing page to another with a timer you can do it like this:

<meta http-equiv="refresh" content="1;url=https://www.domain.tld/" />

The “1” infront of the url defines how long the browser should wait, until he redirects.
Since I dont know the usecase and don’t know why there would be a reason to wait (to serve the page and later redirect?) I would like you to explain your usecase, so we can help you better.

1 Like

i want wait 1 sec so im can be sure the facebook pixel will track the user, i mean it redirect so fast that i was not able to be sure if every user that land on the thanks page will be tracked successfully.

Cloudflare can not help you there, since it it a server and works on server-level, not on client-level. Since the tracking of the facebook pixel requires the page to load.
I would recommend something like this:

<!DOCTYPE html>
<html lang=de>
  <head>
    <meta charset=utf-8>
    <title>Tracking the shіt out of you!</title>
    <meta http-equiv=refresh content="1;url=https://www.domain.tld/">
    <link rel=preload as=image href="https://hereGoesYourFacebookPixel.jpg">
  </head>
  <body>
    <img src="https://hereGoesYourFacebookPixel.jpg" alt="" width="1" height="1">
    You will be redirected shortly.
  </body>
</html>

An alternative would be implementing it with JS

P.S.: don’t do shady things … :crossed_fingers:

1 Like

i have elemento pro, if all i need for redirect after 1 second is this code:

i gonna look if i can insert this code on the page. Thanks for spending time with me, i really apreciate im not sure if i will be able to do it but atleast i know its possible to do it without having to pay a service to do that.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.