Rename Google variables and update to Universal Tracking code

This commit is contained in:
Michael Rose 2016-02-23 11:03:49 -05:00
parent 1a2f3b8025
commit 5875412409
5 changed files with 43 additions and 51 deletions

View file

@ -26,6 +26,9 @@ google_site_verification :
bing_site_verification : bing_site_verification :
alexa_site_verification : alexa_site_verification :
yandex_site_verification : yandex_site_verification :
google_analytics : # Universal Analytics tracking ID
google_ad_client :
google_ad_slot :
# For specifying social profiles. # For specifying social profiles.
# https://developers.google.com/structured-data/customize/social-profiles # https://developers.google.com/structured-data/customize/social-profiles
@ -127,11 +130,7 @@ author:
facebook : *facebook facebook : *facebook
foursquare : foursquare :
github : github :
google : google_plus :
plus :
analytics :
ad-client :
ad-slot :
instagram : instagram :
lastfm : lastfm :
linkedin : linkedin :

View file

@ -1,20 +1,18 @@
# Authors # Authors
billy_rick: billy_rick:
name: Billy Rick name : "Billy Rick"
web: http://thewhip.com web : "http://thewhip.com"
email: billy@rick.com email : "billy@rick.com"
bio: "What do you want, jewels? I am a very extravagant man." bio : "What do you want, jewels? I am a very extravagant man."
avatar: bio-photo-2.jpg avatar : "bio-photo-2.jpg"
twitter: extravagantman twitter : "extravagantman"
google: google_plus : "BillyRick"
plus: BillyRick
cornelius_fiddlebone: cornelius_fiddlebone:
name: Cornelius Fiddlebone name : "Cornelius Fiddlebone"
email: cornelius@thewhip.com email : "cornelius@thewhip.com"
bio: "I ordered what?" bio : "I ordered what?"
avatar: bio-photo.jpg avatar : "bio-photo.jpg"
twitter: rhymeswithsackit twitter : "rhymeswithsackit"
google: google_plus : "CorneliusFiddlebone"
plus: CorneliusFiddlebone

View file

@ -21,8 +21,8 @@
{% if author.facebook %} {% if author.facebook %}
<a href="http://facebook.com/{{ author.facebook }}" class="author-social" target="_blank"><i class="fa fa-fw fa-facebook-square"></i> Facebook</a> <a href="http://facebook.com/{{ author.facebook }}" class="author-social" target="_blank"><i class="fa fa-fw fa-facebook-square"></i> Facebook</a>
{% endif %} {% endif %}
{% if author.google.plus %} {% if author.google_plus %}
<a href="http://plus.google.com/+{{ author.google.plus }}" class="author-social" target="_blank"><i class="fa fa-fw fa-google-plus-square"></i> Google+</a> <a href="http://plus.google.com/+{{ author.google_plus }}" class="author-social" target="_blank"><i class="fa fa-fw fa-google-plus-square"></i> Google+</a>
{% endif %} {% endif %}
{% if author.linkedin %} {% if author.linkedin %}
<a href="http://linkedin.com/in/{{ author.linkedin }}" class="author-social" target="_blank"><i class="fa fa-fw fa-linkedin-square"></i> LinkedIn</a> <a href="http://linkedin.com/in/{{ author.linkedin }}" class="author-social" target="_blank"><i class="fa fa-fw fa-linkedin-square"></i> LinkedIn</a>

View file

@ -1,23 +1,20 @@
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="{{ absurl }}/assets/js/vendor/jquery-1.9.1.min.js"><\/script>')</script> <script>window.jQuery || document.write('<script src="{{ absurl }}/assets/js/vendor/jquery-1.9.1.min.js"><\/script>')</script>
<script src="{{ absurl }}/assets/js/scripts.min.js"></script> <script src="{{ absurl }}/assets/js/scripts.min.js"></script>
{% if site.owner.google.analytics %}
<!-- Asynchronous Google Analytics snippet -->
<script>
var _gaq = _gaq || [];
var pluginUrl =
'//www.google-analytics.com/plugins/ga/inpage_linkid.js';
_gaq.push(['_require', 'inpage_linkid', pluginUrl]);
_gaq.push(['_setAccount', '{{ site.owner.google.analytics }}']);
_gaq.push(['_trackPageview']);
(function() { {% if site.google_analytics %}
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; <script>
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); (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', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');
</script> </script>
{% endif %} {% endif %}
{% if page.comments %} {% if page.comments %}
{% include disqus-comments.html %} {% include disqus-comments.html %}
{% endif %} {% endif %}

View file

@ -235,23 +235,21 @@ Start by modifying `authors.yml` file in the `_data` folder and add your authors
# Authors # Authors
billy_rick: billy_rick:
name: Billy Rick name : "Billy Rick"
web: http://thewhip.com web : "http://thewhip.com"
email: billy@rick.com email : "billy@rick.com"
bio: "What do you want, jewels? I am a very extravagant man." bio : "What do you want, jewels? I am a very extravagant man."
avatar: bio-photo-2.jpg avatar : "bio-photo-2.jpg"
twitter: extravagantman twitter : "extravagantman"
google: google_plus : "BillyRick"
plus: +BillyRick
cornelius_fiddlebone: cornelius_fiddlebone:
name: Cornelius Fiddlebone name : "Cornelius Fiddlebone"
email: cornelius@thewhip.com email : "cornelius@thewhip.com"
bio: "I ordered what?" bio : "I ordered what?"
avatar: bio-photo.jpg avatar : "bio-photo.jpg"
twitter: rhymeswithsackit twitter : "rhymeswithsackit"
google: google_plus : "CorneliusFiddlebone"
plus: +CorneliusFiddlebone
{% endhighlight %} {% endhighlight %}
To assign Billy Rick as an author for our post. We'd add the following YAML front matter to a post: To assign Billy Rick as an author for our post. We'd add the following YAML front matter to a post: