0

First of all, I'm new to development.

Here's the tracking link - https://www.example.com?soldPrice=[price]&someVariable=[subId]&TrasactionId=[subId2]

It works on first pages. But as soon as the user click some other page or button the tracking URL drops - https://www.example.com/about

How can I pass the tracking id to all other pages like https://www.example.com/about?soldPrice=[price]&someVariable=[subId]&TrasactionId=[subId2]

I'm new to development.

  • 2
    First of all, it is not called tracking url but `URLSearchParams`. The search parameters don't care for what they are used. YOu have multiple choice by either adding them through PHP, copy them browser sided through `sessionStorage` or simply adding those search parameters to every `href` attribute within the necessary anchors on your site. – tacoshy Jul 10 '23 at 07:31
  • You need to inject that data into every link on your page dynamically at runtime, probably using php but it could also be done using javascript if necessary. – ADyson Jul 10 '23 at 08:12
  • Either that, or, because repeating the same data multiple times actually isn't that useful, you could just store it in the Session when the use first arrives at your site, and retrieve it from there whenever you see that it's not included in the URL – ADyson Jul 10 '23 at 08:14

0 Answers0