SolvedPrivate

Capture campaign tag information for insert into database

Posted on 2015-01-26
4
22 Views
Last Modified: 2016-02-24
Hello experts,

The basics of the problem is this.  I'm using a campaign tag to track interest in our degree program in Google Analytics.  I have a call to action button that collects basic demographic information.  I would like the button to also collect campaign information that is part of URL.  However, the CTA button is not usually the first thing clicked on.  So the person may navigate to another page on the site and then click the button.  By that time the link has changed and I've lost the important campaign data within the URL.  I realize that Google Analytics is able to track that information throughout a session.  Is there a way for me to track it this info within the session and submit it along with the other user enter information into my database?  I've attached a pic, it may be helpful

Thanks
Capture.PNG
0
Comment
Question by:wsom-itg
  • 2
  • 2
4 Comments
 
LVL 16

Accepted Solution

by:
Lucas Bishop earned 500 total points
Comment Utility
From a very high level, this is the basic process you'd want to build:

1.) Using jquery (ex parsequery) you'd capture the campaign id out of the URL upon initial visit
2.) You'd store the utm_campaign code in a cookie (jquery-cookie). This way even if they navigate from the initial page, or even leave the site, the campaign id is stored
3.) On any CTA button, you'll setup a hidden form field that is populated with the campaign id stored in the cookie, which submits the campaign id into their db record
0
 

Author Comment

by:wsom-itg
Comment Utility
Thanks Lucas.  Would I need to use parsequery on every page of the site?  The site is very large.  Are there any consequences of doing this?
0
 
LVL 16

Expert Comment

by:Lucas Bishop
Comment Utility
You would need the parse functionality and cookie creation on any page where you'd want to capture the url paramater. Basically all of your landing pages.
0
 

Author Closing Comment

by:wsom-itg
Comment Utility
We were able to get it working.  Thanks
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to count occurrences of each item in an array.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now