Did you know that Google Analytics has a plugin function? In fact, the implementation of the tracking code side of various functions such as “display advertising function”, “e-commerce function”, “extended link attribution function”, “cross-domain tracking” that everyone is familiar with is all done by the Google Analytics plug-in function. Realized.
And this plug-in function can be freely added by writing a program to process the plug-in yourself.
Therefore, I would like to introduce a plug-in called Power Analytics that I implemented using this plug-in function .
In addition, we are tentatively responding to the SSL conversion of Yahoo search that started on August 18th.
Introduction to plug-in functions
I don’t think many people know about Google Analytics plugin functionality. In fact, even if you search for “Google Analytics plug-in”, the only Japanese articles that come up are the WordPress plug-in, which is a typical example of CMS tools, and the article about the Google Analytics plug-in itself comes up first. not.
However, Google’s official help for developers also provides an overview of the plugin function and details of how to implement it in the form of Plugins – Web Tracking (analytics.js) .
By implementing the plugin, it becomes possible to publish the Google Analytics extended tracking code implemented so far in the form of a library. For example, clicks on external links and phone number links can be acquired as events, and scroll depth measurement can be made into a library and easily called when needed.
What can you do with Power Analytics?
As the name suggests, Power Analytics was developed as a plugin to power up Google Analytics. The current Powe Analytics features are:
- Custom dimension value settings
- client id – session id
- Time stamp
IP address (End of support: Fixed value “Not Supported” is entered.)
- user agent
- spam filter
- Referrer rewriting
- media rewriting
In addition, you can decide whether to use each function or not by setting options when using the plug-in. In addition, the popular referrer spam is also incorporated into the plug-in in the form of a spam filter. We will explain the details of each function in turn.
Custom dimension value settings
You can easily set general-purpose custom dimensions such as user agent and timestamp. In addition, you can easily implement a client ID that requires some ingenuity to implement with this single plugin.
The following five functions are currently supported. Please create a custom dimension with the specified scope on the Google Analytics administration screen and use it.
|2||Session ID (client ID + random string)||session|
Provides features for hassle-free filtering of referrer spam. This feature works by setting custom dimensions to specific values for traffic that is not considered spam, and the idea of how to defeat referrer spam in a previous article <Complete Edition> with just one filter. is employed. When using the plugin, you can specify a string to be set as a custom dimension for normal traffic, so create a match filter for that string in the view filter.
Also, in the previous article, it was necessary to deal with referrer spam that actually generated access to the site, but this plug-in can deal with such referrer spam. Types that actually access the site are managed as a blacklist, and currently the traffic from the following referrers is targeted (Currently, there is almost no referrer spam that actually accesses the site. ).
- video–production.com (added 2015/08/18 07:45)
We plan to update this list whenever new referrer spam occurs.
You can rewrite the referrer information. At the moment, there are only a few items to be rewritten, and the list is as follows. It targets referrers via twitter, which have been shortened, and Facebook, whose referrer information changes according to the inflow method such as mobile and advertising. Also, this feature will not overwrite if a custom campaign (determined by utm_source) is set in the query part of the URL of the page you are viewing.
In addition, we are tentatively responding to the SSL conversion of Yahoo search, which started on August 18th.
|No||Referrer before rewriting||Referrer after rewriting|
You can rewrite the media information. The object to be rewritten is
- Set media “email” for traffic via webmail
- Set the media “social” for traffic coming from social media
- Set media “rss” for traffic via RSS reader
- Temporarily set media “organic” for inflow from Yahoo search
It will be 3 patterns of. Webmail judgment, social media judgment, and RSS reader judgment are currently based on the following list. Also, this feature will not overwrite if a custom campaign (determined by utm_medium) is set in the query part of the URL of the page you are viewing.
|No||Referrer condition||Media after rewriting|
|Five||Equal to email.excite.co.jp|
|6||equal to outlook.office365.com|
|7||Equal to mail.ocn.ne.jp|
|8||Equal to webmail.sso.biglobe.ne.jp|
|9||Equal to webmail.so-net.ne.jp|
|Ten||Equal to eowebmail.eonet.jp|
|11||Equal to mail.auone-net.jp|
|12||is equal to mail.goo.jp|
|13||Equal to mail.commufa.jp|
|14||Equal to webmail.cyberhome.ne.jp|
|15||equal to t.co||social|
|16||equal to facebook.com||social|
|17||equal to www.facebook.com||social|
|18||equal to m.facebook.com||social|
|19||equal to l.facebook.com||social|
|20||equal to lm.facebook.com||social|
|twenty one||equal to reader.livedoor.com||rss|
|twenty two||equal to feedly.com||rss|
|twenty three||equal to feeds.feedburner.com||rss|
|twenty four||equal to search.yahoo.co.jp||organic|
How to use Power Analytics
Power Analytics plugin data is located at http://power-analytics.appspot.com/plugin.min.js . Since it is hosted on Google App Engine, it can be accessed by changing http to https even in an SSL environment, so even if you are using an SSL environment on a commercial site, you can use it with confidence ( This site is also SSl, but it works without problems.).
Also, like features for display ads and cross-domain tracking, you need to run the require command. Power Analytics requires a plugin named powerup. this is,
Specify After that, we will add the tracking code according to whether the custom dimension expansion, spam filter, referrer rewriting, and media rewriting functions are used. Below is an example of the complete tracking code for full use of all four features (when installing Power Analytics on a site that already has other customizations, be careful not to remove the existing customization code. Please).
There is no problem if you delete each line of functions that you do not use. Also, for functions that use custom dimensions, it is necessary to create custom dimensions in advance from the property settings on the Google Analytics management screen. After creating it, you need to write down the index number of the custom dimension and reflect it in this tracking code.
Although there is still little information about the Google Analytics plug-in function, by implementing the plug-in, you will be able to use the customization code so easily. If you implement it in the same way, you can easily use various functions such as click events of external links and phone number links, page scroll status tracking, form input tracking, etc.
For Power Analytics bug reports, feature addition requests, referrer spam and webmail list addition requests, please contact us through SEM Technology’s Facebook page or SEM Technology’s inquiry form .