dvygolov / YellowCloaker

Free cloaking script for affiliate marketing
265 stars 134 forks source link

How can I preserve my URL parameters when redirecting to another site? #47

Closed lariguedes98 closed 2 months ago

lariguedes98 commented 2 months ago

Hello, I need to preserve the utm parameters of the URL when redirecting to another site.

Example:

My cloaker is at: https://mydomain.com/cloaker

When clicking on the ad, the user will have a URL similar to this: https://mydomain.com/cloaker?utm_source=fbads&utm_term=instagram_feed

On the black page, my cloaker is configured to be redirected to this site: https://myotherdomain.com

I would like the user to arrive at the second site with the parameters of the first domain, would it be possible to do this? How?

In the user's browser it would look like this: https://myotherdomain.com?utm_source=fbads&utm_term=instagram_feed

image

dvygolov commented 2 months ago

As far as I remember you should use macros in the redirect link. So you should redirect to:

https://myotherdomain.com?utm_source={utm_source}&utm_term={utm_term}

You should be able to use any parameter from the original request link using {}

Try it and let me know if it works.

On Mon, Sep 23, 2024 at 3:09 PM lariguedes98 @.***> wrote:

Hello, I need to preserve the utm parameters of the URL when redirecting to another site.

Example:

My cloaker is at: https://mydomain.com/cloaker

When clicking on the ad, the user will have a URL similar to this: https://mydomain.com/cloaker?utm_source=fbads&utm_term=instagram_feed

On the black page, my cloaker is configured to be redirected to this site: https://myotherdomain.com

I would like the user to arrive at the second site with the parameters of the first domain, would it be possible to do this? How?

In the user's browser it would look like this: https://myotherdomain.com?utm_source=fbads&utm_term=instagram_feed

image.png (view on web) https://github.com/user-attachments/assets/9548d08f-57d3-4f53-90d1-3b3cebd164b4

— Reply to this email directly, view it on GitHub https://github.com/dvygolov/YellowCloaker/issues/47, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACGSGCOIM3CRASN3BA4X3N3ZX7ZFTAVCNFSM6AAAAABOV2L4VWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU2DEMZQHA2DANI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

lariguedes98 commented 2 months ago

At first, just putting the parameters as you indicated, it didn't work, but checking the option shown in the image, it worked perfectly. Thanks, Daniel!!

image