I am trying to set a cookie in wordpress to track referrals.
The link will come in as domain.com/?ref_id and should follow through a link to domain.com/subfolder/?ref_id
I understand it should be very simple so please forgive my ignorance in the matter.
Thanks, ,
John.
John,
You want to do something similar to the following:
Don’t forget to sanitise the query string you are pulling in from $ref_id