
Google Analytics — a freeware statistics service for Google’s companionship companies — provides such detailed statistics with a host of powerful tools that it instantly became popular among webmasters, including Runet experts. But even such a developed and thought-out system has several disadvantages. And cope with them is obtained far from always, and certainly not with a little blood, because all the Google Analytics tools, data processing scripts and, most importantly, all the statistics obtained are stored on Google servers, official information and consultants provide a minimum of information, and the main script for collection of
ga.js and that is obfuscated to impossibility. All this ties hands when trying to solve problems arising from data processing.
Many of these problems, Google gently ruffles the nerves of Russian-speaking users: there are mysterious problems with encodings, disregard for Runet search engines and a problem that has long depressed both modest owners of online stores and experienced web analysts - a categorical refusal to perceive Yandex advertising platforms. Direct. Moreover, such hatred is not reciprocal, and Yandex.Metrika honestly tries to process, as best it can, transitions from Google Adwords, but the maximum, as Analytics support suggests, is to use the Linker URL to mark its advertising campaigns. I still managed to find a solution to the current situation and make friends the stern Google with my Russian-speaking colleague.
1) Use URL builder
The first, most popular and almost the only method used by everyone to track their own advertising campaigns. Including Yandex.Direct campaigns.
The tool for implementing this method is offered by Google Analytics itself -
URL Linker . The essence of the tool is in addition to the target URL of your ad specific parameters-tags, which in turn successfully recognize and sort Analytics.
These are tags:
•
utm_source (mandatory) —for marking the source of the transition, in our case
YandexDirect ;
•
utm_medium (mandatory) —The campaign
media , such as a banner or newsletter. We have a
cpc ;
•
utm_campaign (mandatory) - the name of the campaign for the convenience of distinguishing them. The same
YandexDirect ;
•
utm_term - the keyword itself. For example,
tort_habrahabr ;
•
utm_content - mark ads or any differences in placement within the same source. For example,
text_ad1 .
The result is a link like:
yummyhabr.ru/tort/?utm_source=
YandexDirect & utm_medium =
cpc ...
... & utm_term =
tort_habrahabr & utm_content =
text_ad1 & utm_campaign =
YandexDirectWhich we need to make a target for our ads in Yandex.Direct.
Consider the pros and cons of this method:
+ Works for sure and fairly accurately. After all, Analytics itself promises its work.
+ Accounting for different parameters (means, content, name) when marking ads.
It's all. And wherein:
- No wonder in the example I did not use Cyrillic. With her, everything is very, very tight. Rarely when it works stably and is recognized. Use translit.
- And instead of spaces it is better to use underscores.
- If you have already launched an advertising campaign with a hundred or two ads in Yandex.Direct, then you’ll have the job of translating keywords from a hotly appreciated Russian to transliterate and mark all this good hundred.
- In addition, many of them have several key phrases on one ad. So, using this tagging, we can only track the ads themselves, not the phrases that correspond to them, because Yandex.Direct allows you to assign target URLs directly to the ad.
Bonus:With a special
exacerbation of laziness, you can write your own small script to automatically generate the URL and mark the ads. For example, using the PHPExcel class and the
ability to upload data from campaigns to an xls file, which Yandex.Direct kindly provides. I sketched
one “on the knee”
like this (accepts unloaded xls or created using the Yandex template).
')
2) Use _openstat
The first thing I came up with was not satisfied with the official URL linker - this is a perverted method of using OpenStat tags. OpenStat is a base64-encoded parameter set that is included in the URL and is recognized by some statistics systems, such as LiveInternet or SpyLog, but not by our beloved Google Analytics. Yandex.Direct supports and allows you to use these tags automatically in their advertising campaigns. In this case, the tag includes the identification number of the advertisement in the Yandex.Direct system, the keyword number, the source and position of the advertisement on the output page. Tags are automatically generated by Yandex for each ad each time it is issued to the user. It is enabled on the campaign settings page by ticking “External Internet Statistics: - Connect”. Now target URLs marked with the _openstat parameter can be filtered in Google Analytics as belonging to Yandex.Direct.
To do this, we create three custom advanced filters in Google Analytics (
read more here ):
• Filter1
Field A-> “Request URI”: (/?_openstat=.*)
Output in-> “Campaign Source”: YandexDirect
• Filter 2
Field A-> “Campaign Medium”: organic
Field B-> “Campaign Source”: YandexDirect
Output to-> Campaign Medium: cpc
* Field B is required
• Filter 3
Field A-> “Campaign Source”: YandexDirect
Output in-> “Campaign Name”: Yandex.Direct
Thus, we take all the transitions made by the URL that contains the openstat parameter and define them as transitions from Yandex.Direct ads.
We get this picture:
What happened:
+ Quickly with one click enable tracking of all ads at once.
+ Under the keywords we see exactly the user requests for which they found us.
+ All in Russian.
But:
- We can not share and evaluate statistics for our keywords.
- The whole picture collapses, if we still use openstat marks for statistics somewhere or such links appear somewhere (for example, they were indexed by search engines or added by the user to bookmarks). Therefore, we immediately add to the robots.txt parameter
Disallow: / * _ openstat .
- And the main disadvantage is that after visiting our website using the marked URL and its transition to another internal page, the label is lost, which means it is not processed by our filters and is not marked as an advertising transition. As a result, we will not receive reports on conversions by this source and the average number of visited pages here will always be less than 2.
Bonus:If you liked this method with something, do not be confused by displaying user search queries in keywords, then you can use the Custom segment in Google Analytics to track full statistics on such transitions (at the top right in the Advanced Segments reports), where “Campaign” “exactly corresponds” to “Yandex.Direct”, that is, the name we specified in the filters. In this case, Google Analytics for this segment shows not only statistics on visits to the site, which have YandexDirect source, but also internal transitions on the site of visitors with such a source, and, accordingly, conversion and so on. Why is he so mysteriously acting, I do not know. After all, it turns out that he knows, sly one, about the source of our wandering user, but he refuses to enter the internal transitions in the campaign statistics.
3) Use Yandex.Direct templates
We are trying to improve the first method and teach Google Analytics to somehow recognize individual key requests and be friends with the Russian language. While I was teaching, I even tried to create 30 internal filters by reverse translating our key phrases, but nothing good came of it ...
But we draw our attention to the “
templates ” tool in Yandex.Direct. It works simply. If we select a word or phrase in our text ad with the # tags (oktotorp, also known as "grid"), when issued to the user in the search for our ad, the word or phrase between these tags will be replaced with the keyword corresponding to the search query of this user. . If it is impossible to replace, the default is the word or phrase enclosed in these tags.
And the most useful for us in this tool is that it is possible to apply templates even to the target URL of the ad. In this case, the Cyrillic keywords are inserted into the link in UTF-8 format.
Now we can create something like this using the URL builder:
yummyhabr.ru/tort/?utm_source=YandexDirect&utm_medium=cpc…
... & utm_term = tort_habrahabr & utm_content = # text_ad1 # & utm_campaign = YandexDirectAnd we will see in the statistics:
The ad content column now shows our key queries received after applying templates. It is immediately obvious that we don’t always have UTF-8 here. However, this is another joy from Google Analytics, the Yandex.Direct tool has nothing to do with it. And it becomes clear why, in order not to spoil the statistics, we used the templates in utm_content (“ad content”), and not in utm_term (“keywords”).
But there are pluses:
+ All the same stability, as the official linker URL is used.
+ Now, somehow, but we can recognize our specific keywords.
+ Moreover, we can even relate and filter statistics on individual ads and their corresponding words.
The cons are obvious:
- Nobody loves the "krakozyabra" and it is hard to understand "where exactly those 23 people came from."
- Again, have to mess with all of our ads.
- As a result, full of garbage, you still have to break your eyes over the transliteration, and now also over the "left" encodings.
4) We use all the achievements
I was inspired by the example of Brian Clifton (Brian Clifton), the head of Google’s Web Analytics department, which he cited in his book
Advanced Web Metrics with Google Analytics . That example described the ability to add to the main Google Analytics script, placed on each page of the site, its own code that allows you to work with cookies and collect information on transition sources.
So, take everything that we used before and add some JavaScript.
For this we:
• Mark all ads in our campaign with tags from the Google linker, using Yandex.Direct templates, as in the third method. We get:
yummyhabr.ru/tort/?utm_source=YandexDirect&utm_medium=cpc…
... & utm_term = tort_habrahabr & utm_content = # text_ad1 # & utm_campaign = YandexDirect• We write a JavaScript script (let's call it, for example, directdecode.js), which will pull out the utm_content parameter from the URL of our page (location.search), decode it using decodeURIComponent and in the case of IE use another converter from Win-1251 to UTF-8. Using the Directkey () function, write the resulting value to the user variable using the "_gaq.push (['_ setVar', keyw]);" method, where keyw is the value we decoded.
• We connect the directdecode.js script to the pages and add the Directkey () function to the Google Analytics code on all of our pages in the following way:
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXXX-X']);
//
Directkey();
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
This function will pull out our keyword from the URL, carefully inserted into it with the Yandex.Direct template, in case you need to decode it and write it as a custom Analytics variable.
• Add the following custom advanced filter to your profile in our Analytics account:
YandexDirect FilterField A-> “Campaign Source”: YandexDirect
Field B-> “User Defined”: (. *)
Output in-> “Campaign search terms”: $ B1
* Field B is required
Thus, we take our decoded keyword from a user variable and write it into our reports on Yandex.Direct.
Everything. We give time for the passage of the moderation of ads and script remaking by site users. We get the desired image:
Pros:
+ All in Russian.
+ All data is full, displayed in all reports.
+ Statistics for specific keywords.
And cons:
- A rather complicated connection. And again I have to use the URL linker (by the way, my automatic converter issues a URL immediately under this method using templates).
- There may be minor glitches due to the failure of the encodings.
I had the opportunity to thoroughly test all methods on a large sample of sites for a sufficient time, and I stopped on the fourth method. Now I’m happy to collect statistics on contextual advertising Yandex.Direct on Google Analytics.
The measurement error for transitions in all methods is 5-10%. It is within the normal range.