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

View file

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

View file

@ -21,8 +21,8 @@
{% 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>
{% endif %}
{% 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>
{% 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>
{% endif %}
{% 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>

View file

@ -1,23 +1,20 @@
<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 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() {
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);
})();
{% if site.google_analytics %}
<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', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}
{% if page.comments %}
{% include disqus-comments.html %}
{% endif %}

View file

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