• Resolved moeclone

    (@moeclone)


    Hi! can you please tell me how it is possible to realize the presence of parameters in the url when navigating through the pages of the site?
    user gets to page A by affiliate program, so there are utm tags in the link:
    https://blablabla../a?utm_source……..&utm_term……
    Now he clicks and goes to another page and there are no parameters in the url line, how to make them always be visible on any pages if these parameters were in the link when the user gets to the site?
    or is it impossible in wordpress?

    • This topic was modified 2 years, 9 months ago by moeclone.
    • This topic was modified 2 years, 9 months ago by moeclone.
Viewing 6 replies - 1 through 6 (of 6 total)
  • I guess the question is why do you want to keep them? Most ‘tracking’ systems set a cookie on arrival so you can track through the user journey.

    Moderator bcworkz

    (@bcworkz)

    Or the broader question would be how to do so for any reason, tracking or not. WP generates links in a number of ways, so there’d be a number of approaches to reliably modify all possible internal links. Using the “the_permalink” filter should deal with most internal links. add_query_arg() is a useful function FWIW.

    Despite the ability to do so, I think it’s more reliable to save any values you need to persist between requests as cookie values. It can happen that query strings get dropped during rewrites and similar server processes.

    Another way to have values persist is via session vars, but WP can have issues when PHP sessions are not well implemented.

    Yes – as above, but basically use cookies ( like tracking systems ) 🙂

    Thread Starter moeclone

    (@moeclone)

    thank you, implemented through cookies

    Thread Starter moeclone

    (@moeclone)

    @alanfuller , @bcworkz , Could you please advise me, made an implementation via cookies, in Chrome Firefox browsers works fine, but in Safari cookies are not set via script js ? what could be the reason for this behavior of Safari ? how to solve it ?

    Moderator bcworkz

    (@bcworkz)

    JS to set cookies should work across all common browsers. It may be your Safari is configured to reject cookies? You can send code to set cookies, but clients do not have to accept them. Users ought to know that refusing cookies can cause usability issues on some sites.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘query params in url’ is closed to new replies.