Jump to content

append links with current dynamic url


toolman

Recommended Posts

Hi,

 

I have a URL which pulls through some dynamic items, for example:

http://www.website.com/page.shtml?code=home&ref=ref1&utm_source=direct&utm_medium=email&utm_campaign=weekly

The ref=ref1 is a cookie, but I have an issue when going off that page and visiting another. The cookie somehow gets reset and results in it becoming undefined.

What I would like to do is to append two links on the page with

page2.shtml?code=home&ref=ref1&utm_source=direct&utm_medium=email&utm_campaign=weekly

and

page3.shtml?code=home&ref=ref1&utm_source=direct&utm_medium=email&utm_campaign=weekly

so that the links will carry through the ref= and other items.

I have read that I can use 'document.location.search', but I'm not sure how to do this, or if I can use jQuery either.

Any ideas on how I can do this?

Thanks!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.