Google AdWords - How to correctly use Auto-Tagging and UTM variables in AdWords? - google-analytics-api

Let me preface this question with a little background information:
I have a web based system that takes in data from the Google Analytics API and displays that information based upon each clients needs via a web interface.
I use unique URLs for each source/campaign ( Google AdWords, LinkedIn, Facebook, Display Ad Networks, etc. ) containing 'utm' variables and the system generated values. Example: url.com/?utm_source=Google&utm_medium=PPC&utm_content=1234&utm_campaign=This-is-the-campaign-name
Google Analytics is the repository, since a large majority of clients use it on their websites, it's a natural fit to use them as the workhorse for data capturing.
All of the clients have active Google AdWords campaigns, connected Google Analytics accounts, and they have enabled Auto-Tagging.
When I test a Google text ad, the link that is populated in the web browser is similar to the following: url.com/?utm_source=Google&utm_medium=PPC&utm_content=1234&utm_campaign=This-is-the-campaign-name&gclid=123xyz
My current dilemma is centered around AdWords campaigns with Auto-Tagging enabled. The data capture process for all sources ( excluding Google AdWords ) works fine. I have unique tracking codes populated in the 'utm_content' variable, therefore when I call the Google Analytics API, this tracking code acts as my unique identifier. For all Google AdWords campaigns, I update all the destination links within the ad creative to include the system generated URLs that also include the prepopulated values. When viewing the reporting in Google Analytics, the variables/values are non-existent, it is as if Google completely disregards these values and uses a back-channel from Google AdWords to Google Analytics to input the campaign properties. For these Google AdWords campaigns, the visits are not lost, but rather they are associated to the standard Google AdWords campaign/ad group in Google Analytics.
Here is a list of things that I do know:
From what I have read, disabling Auto-Tagging would fix this issue and allow the 'utm' variables and their values to be passed from Google AdWords into Google Analytics. The consequence of disabling Auto-Tagging would be the loss of click to conversion and cost data.
KISSmetrics has documented a similar issue when working with clients that also use Google Analytics. Links that contain the 'gclid', Example: url.com/?gclid=123xyz ( Auto-Tagging enabled ), will not have any additional information logged ( campaign source, medium, etc. ). Links that also contain the 'utm' variables, Example: url.com/?utm_source=Google&utm_medium=PPC&utm_content=1234&utm_campaign=This-is-the-campaign-name&gclid=123xyz, this information is passed to KISSmetrics. For this second scenario, I am assuming the KISSmetrics javascript is reading the URL variables and values.
Here is what I am trying to achieve:
I am trying to avoid having to add a proprietary javascript that reads the URL variables and values and then posts that information to an external URL.
I do not want to add line items to the current Google Analytics javascript ( example: custom variables ).
I am looking for an 'out-of-the-box' solution that perhaps takes into consideration AdWords ValueTrack parameters. My familiarity with these variables is limited, therefore I can not determine if one of these values can be used as a unique identifier to later reference when I access the data using the Google Analytics API. Or as an alternative, using a Google AdWords dimension to do the same. See http://developers.google.com/analytics/devguides/reporting/core/dimsmets/adwords.
I would like to determine if it is possible to continue with the methodology of generating unique URLs, assigning them to Google AdWords campaigns, and taking the results of those campaigns from Google Analytics via their API, without compromising the click to conversion and cost data ( disabling Auto-Tagging ).
Thanks in advance for reading through my plight and any feedback you provide will be greatly appreciated.

So you are correct. When Google Analytics sees both UTM params and the auto-tagging GCLID, it discards the UTM params in favor of the GCLID.
However... acknowledging that this is an issue, especially since AdWords advertisers that use their Conversion Import feature often use both UTM and GCLID, they enabled an override switch in Google Analytics accounts that allows the use of both.
You can learn more about it in their FAQ at https://support.google.com/analytics/answer/1033981?hl=en
I think this should solve your problem.
Jon

Related

Is it possible to use youtube analytics Api in that way?

Hi i create application that is common to youtube and i`ve got some questions. I use google login(oAuth), so i keep in my database all things required to use google APIs for every user that wants to log in. The question is if i can use(is it possible and legal) google analytics to get info(like gender of people which shows his/her video or age or region) about every user that is loged in to my application and show it to another users which using my application ?
edit:
I do not know if you understood me well, user log in to my app with his google account, i have in my database his google token, etc. In my application all users have got youtube account and now what i want to do is that if you are log in, you can see user`s statistics from youtube(like the gender of people who watch his/her video and what is thier age) for any user registered in my app. There is a youtube analyse api, which alow you to get your account stats, and if i have access to someone`s google account(i keep toke in my datbase), i couldnt just use it to request that analyse api for every user and in that way get access to their stats. And another question is if i get data in the way that i described(of course if it is possibe), is it legall, if i can display such an info to other users not only to the owner of the account?
Thanks for help
Is it legall, if i can display such an info to other users not only to the owner of the account? Thanks for help
If you are authenticating a user to get access to their Private data. It is your responsibility as a developer to ensure that their data remains private. You should not be sharing data between your users without there express permission.
If the data you are accessing is public then you are allowed to display that data with anyone.
Remember when you created your google developer console account you agreed to this Google APIs Terms of Service
b. Compliance with Law, Third Party Rights, and Other Google Terms of Service
You will comply with all applicable law, regulation, and third party rights (including without limitation laws regarding the import or export of data or software, privacy, and local laws). You will not use the APIs to encourage or promote illegal activity or violation of third party rights. You will not violate any other terms of service with Google (or its affiliates).
d. User Privacy and API Clients
You will comply with all applicable privacy laws and regulations including those applying to PII. You will provide and adhere to a privacy policy for your API Client that clearly and accurately describes to users of your API Client what user information you collect and how you use and share such information (including for advertising) with Google and third parties.
You may also want to read Privacy policy

How do I see in Google Analytics specific Facebook post exactly bringing me traffic?

I would like to see in analytics specific Facebook posts that are bringing traffic to the site. The 'Referrals' doesn't provide this info, but only shows how much traffic came from Facebook.com and m.facebook.com.
You can do this with the help of UTM Parameters.
What Makes Up a UTM Link?
Here’s my link for a test post
www.yourwebsite.com?utm_source=facebook&utm_medium=social&utm_campaign=post_name&utm_content=post_content
Now let’s break this link down, to understand what each metric means, and what it corresponds to in Google Analytics.
First, there is the “utm_source” value, which translates to the “source” dimension in Google Analytics. This is where traffic is coming from. You can name it whatever you want. In this example, my source is “facebook”
Equally as important is the medium, specifically “utm_medium,” which tells me what type of traffic this is. As this is from social media, I have named it social.
Easily the most important part of the link — “utm_campaign” — is the name of what you’re tracking, for example, “Summer Promotion.” Think of this as another way to roll up all the different posts and sources to see higher-level insights.
The next two metrics — “utm_term” and “utm_content” — are both optional and interchangeable. It’s about personal preference and how granular you want to get with your analysis.
If you don't want to build the URLs manually, you can use URL Builder from google.
Make sure you paste the full URL in the URL builder so that it populates the correct URL. Also make sure that you paste the whole URL created by URL builder with all UTM parameters on Facebook.
Hope this helps.

Cannot retrieve the reach estimate for some Facebook ads (from the API)

The API lacks some clear explanations on retrieving the reachestimate for either an ad account or an ad. I have made sure that:
I am an admin/ or added to a Facebook app
I have a paid advertising campaign
The adaccount ID is added in the Settings Advanced panel of the Developer App page
I've been trying to:
In Graph API Explorer, retrieve the data by query expansion: me?fields=adaccounts{campaigns{adsets{ads{reachestimate}}}}. However, I always get one of the following (randomly):
Still in the explorer, retrieve it by direct access: act_{adaccount_id}/reachestimate I get this, even if I am 100% sure the ad account is added in the Advanced Settings panel:
Both of 1 and 2 in the iOS project. I get this: com.facebook.sdk.core error 8
Test it by curl with the example from here. I get this (the same with the one from point 2): The ad account is not enabled for usage in Ads API.
Just as a further note, for point 1 that's not the whole query, but I didn't write the adjacent fields because they would've been redundant for the purpose of this question.
I simply need to retrieve the ad accounts, the campaigns, the ad sets and the reach estimate simultaneously in the same query. It seems like a dead spot for me. Do you have any suggestions? Can you show me a Graph API explorer working example? Or, if what I'm asking is impossible, can you simply show some code that works?
Are you app and ad account owned by the same person?
Facebook Ads API has tiered access. https://developers.facebook.com/docs/marketing-api/access
A newly registered app is in Development Tier and can only access the user's own ad accounts. You need to make some API calls on your own ad account for testing in order to get promoted to Basic Tier and manage other people's ad account.
Apparently, I got:
Please reduce the amount of data you're asking for, then retry your request.
Because the query was to broad. Those 'adjacent' fields actually triggered a massive query, so the solution was to either:
Put a limit(1) on the campaigns.
Individually retrieve the reachestimate for each adset.
I chose the latter because it suited my needs, but it's up to you which solution works better.

Get page visitors from google analytics API

Reading Google Analytics API docs is like diving into Mariana Trench... so hoping to get some help here.
I have a website that users will visit one page per visit (most of the time). I've placed google analytics script on each page (can view reports in my GA account) and now want to write a "reporting page" on which to display information about "per page usage":
page1: 100 visitors, countries, OSes, ...
page2: 125 visitors, countries, OSes, ...
I want to get this info from API.
Could some one please point me to the right pages of the docs, from the very beginning?
For I can't understand even why I should use 2-step OAuth authorization there (or shouldn't I?) - since I'm writing this report for my own site on which I have already placed google scripts thus authorizing everything.
Thank you.
What i am thinking is that I could have a Webapplication with your pages listed. Web application itself is authenticating and querying the result on when user try to find statistics of particular page.
You should follow
1. Register Service account and get authentication key file
2. Register email account viewed in along clientid email a screen in google analytic users as admin level user
3. Use ga-dev-tools.appspot.com/explorer for query building
4.Implemenation needs
a) First Authenticate with the key
b) Get profile id and pass it to the fetching method
c) Fetch data of the query

Why is custom variable data in the Google Analytics Data Export API data different from my Google Analytics dashboard?

I have a custom variable defined on my site and the data is being recorded properly in my Google Analytics account. When I go to access the data via the Google Data Feed Query Explorer, the data I get isn't the same. Really, this is only the case with 'Visits' and any metrics calculated using it.
This is what I see in my dashboard:
http://www.screencast.com/t/QJl21ZOmpw
This is what I see in the query explorer:
http://www.screencast.com/t/WNGLiUUWum
I made sure the time frame matches and have pulled the same metrics. 'Hits' (aka pageviews) match up perfectly every time. Visits is obviously off and seems to be messing up other metrics that depend on it, such as 'Pages/Visit' (aka pageviews per visit).
I have reviewed the code and the custom variable is being set prior to recording the pageview. Am I missing something? My understanding is that Google Uses this exact same API to run their Analytics Dashboard, so why am I getting different data?
Try removing the visitors metric from your feed in the Query Explorer. A "Visitor" is different than a "Visit". I believe the stats of the Google Analytics screenshot have nothing to do with visitors. And including this metric might actually limit your result set to the unique visitors (I think).