Sunday, May 19, 2024
HomeTechnologyIntroducing the Google Analytics Plugin “Power Analytics”!

Introducing the Google Analytics Plugin “Power Analytics”!

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.

thumbnail 7

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.

No Possible values scope
1 client ID user
2 Session ID (client ID + random string) session
3 Time stamp hit
Four IP address session
Five user agent session

spam filter

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. ).

  • 100dollars-seo.com
  • semaltmedia.com
  • videos-for-your-business.com
  • buttons-for-website.com
  • success-seo.com
  • video–production.com (added 2015/08/18 07:45)

We plan to update this list whenever new referrer spam occurs.

Referrer rewriting

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
1 t.co twitter.com
2 m.facebook.com facebook.com
3 l.facebook.com facebook.com
Four lm.facebook.com facebook.com
Five search.yahoo.co.jp yahoo

media 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
1 Including mail.yahoo.co.jp email
2 including mail.live.com email
3 contains mail.google.com email
Four including alpha-mail.ne.jp email
Five Equal to email.excite.co.jp email
6 equal to outlook.office365.com email
7 Equal to mail.ocn.ne.jp email
8 Equal to webmail.sso.biglobe.ne.jp email
9 Equal to webmail.so-net.ne.jp email
Ten Equal to eowebmail.eonet.jp email
11 Equal to mail.auone-net.jp email
12 is equal to mail.goo.jp email
13 Equal to mail.commufa.jp email
14 Equal to webmail.cyberhome.ne.jp email
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,

ga('require', 'powerup');

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.

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  ga('create', 'トラッキングIDをここに入れる', 'auto');
  ga('require', 'powerup');
  ga('powerup:dimensions', {
    'clientid': 1,
    'sessionid': 2,
    'timestamp': 3,
    'ipaddress': 4,
    'useragent': 5
  });
  ga('powerup:spamFilter', {
    'dimension': { 'index': 6, 'value': 'Referrer Spam Avoidance' }
  });
  ga('powerup:source');
  ga('powerup:medium');
  ga('send', 'pageview');
</script>
<script type="text/javascript" async src="//power-analytics.appspot.com/plugin.min.js"></script>

summary

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.

If you are interested in implementing a plugin function, please refer to Google’s official help for developers, Plugins – Web Tracking (analytics.js) . It requires a slightly higher level of JavaScript knowledge, but I think it’s worth it.

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 .

RELATED ARTICLES

Leave a reply

Please enter your comment!
Please enter your name here

Recent Posts

Most Popular

Recent Comments