Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 628623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:39:25+00:00 2026-05-13T19:39:25+00:00

This is an update, since Gaby was able to help me with my issue.

  • 0

This is an update, since Gaby was able to help me with my issue. This now works

DEMO TIME!
http://media.apus.edu/it/ref/page1.htm

In a nutshell – this code will send the referring URL from page 1 to page 3 dynamically when you click the link. Why is this important?

We’re not able to place analytical code (google analytics) on page 3 since it is a third party website. We should now be able to track leads from page 1, which is also a third party website, when they click to page 2 (our website that has google analytics) and then click a link to page 3 (third party site that can’t by customized) as this site uses its own analytic code to track campaigns.

Page 1: Click link and it will take you to page 2.

Page 2: Page 2 knows you came from page 1 and will pass the referring URL from page 1 to page 3 when you click it. Also, the link is assigned a class that will call the function, because we are not able to assign an onclick to links in our CMS. Also, Gaby helped resolve the issue of having me use the same ID more than once and now I only need to use a class assigned to the link. No more ID is needed… Thank you! This will enable me to assign any link on the page to pass the referring URL if it’s assigned the css class.

I’m sure someone out there will benefit from this code… please pass it along!

PS. I’m aware this code won’t work if page 1 comes from a secure site.

Evan

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T19:39:25+00:00Added an answer on May 13, 2026 at 7:39 pm

    No need to access the element by the ID since you want the same logic applied to multiple items.. (and you already have access through the click event ..)

    your code should be

    $(document).ready(function()
      {
        $(".referringClass").click(function(event)
          {
            if (document.referrer != '')
              {
                var testing=document.referrer;
                var href = $(this).attr('href');
                $(this).attr('href', href + "?campaign-id=" + testing );
              }
          }
         );
     });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Update: Now that it's 2016 I'd use PowerShell for this unless there's a really
Important Update Since the release of MVC 2.0 Preview 1 this feature has been
Update: This turned into a blog post, with updated links and code, over at
Update: this question, including the title, was rephrased, see history for details I know
How do you update this? I've never seen any current team that actually checks
Duplicate of this question . update - This is not an exact duplicate. See
I am having virtually the same problem as this: C# Update combobox bound to
Update: Check out this follow-up question: Gem Update on Windows - is it broken?
Update: Please read this question in the context of design principles, elegance, expression of
Update: looks like this is indeed a WiX limitation - Cannot add 64bit com+

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.