0

I've been researching ideas on how to implement this for a while now but can't really find what I'm looking for - hopefully someone can offer up some advice or point me in the right direction.

For purposes of visitor tracking, I'm looking to monitor activity on my website via a unique query string, e.g:

mysite.com?custom-string

I want to preserve the query string on all other pages of the site, but only have this available to the person who has accessed it. The idea being, they can navigate to other URLs and the query string will still be appended to the URL on the page load/change.

Is this possible? And what would be the best way to implement this? JS/Cookies? This is relatively new to me.

Thanks in advance for your help.

Mark.

1 Answer 1

3

For purposes of visitor tracking, I'm looking to monitor activity on my website via a unique query string, e.g:

Instead of tempering with your URLs you should either use cookies (https://code.tutsplus.com/tutorials/an-introduction-to-cookies--net-12482) or sessions (https://www.thesitewizard.com/php/sessions.shtml).

It will allow people to share URLs while preserving your ability to monitor each visitor.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the reply Gab. This doesn't quite fit my use case... I'm using third party software for visitor tracking. So I need to be tracking using a query string because that will be used as the identifier for a select group of users who have been provided with the link.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.