Skip to content

Commit

Permalink
Default pageview to location.pathname
Browse files Browse the repository at this point in the history
  • Loading branch information
khiemlam committed Oct 3, 2018
1 parent b167405 commit d14f82b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/middleman-google-analytics/analytics.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
ga << "ga('set', 'anonymizeIp', true);" if @options.anonymize_ip
ga << "ga('require', 'linkid');" if @options.enhanced_link_attribution
ga << "ga('require', '#{@options.optimize}');" if @options.optimize
ga << "ga('set', 'location', location.pathname);"
ga << "ga('send', 'pageview');"
%>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
Expand Down

0 comments on commit d14f82b

Please sign in to comment.