google-analytics

dataLayer.push not working after GTM script

三世轮回 提交于 2019-12-04 12:58:30
I want to implement the Enhanced Ecommerce with Google Tag Manager and I want to push some data for the tag Universal Analytics. I always created the dataLayer before the GTM script, but now I need to send other data with dataLayer.push And it doesn't work, datalaLayer.push only works if I do it just before the GTM script starts. Example. This works: <script> <head> dataLayer = [{ 'google_tag_params': { 'ecomm_pagetype': 'category', 'ecomm_category': '{{ $resource->seo->h1 }}', } }]; dataLayer.push({ 'ecommerce': { 'currencyCode': 'EUR', 'impressions': [ { 'id': '12312', 'price': 24, 'category

gtag not sending custom dimensions for events

耗尽温柔 提交于 2019-12-04 12:54:34
问题 I'm having trouble using gtag to send to custom dimensions. I'm currently following their gtag documentation. Screenshot of the custom dimensions created for my google analytics property Right now I currently initialize my gtag in the head with the following code: %script{:async => "", :src => "https://www.googletagmanager.com/gtag/js?id=#{APP_CONFIG[:ga_tracking_code]}"} :javascript window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date());

Catching UTM Params in Rails

∥☆過路亽.° 提交于 2019-12-04 12:49:59
I am trying to catch the UTM Params in the URL to add Source, Campaign etc to a User Account. Sadly, I can't seem to figure out how to catch those params. As of know I following the Blog Article http://www.matthuggins.com/articles/tracking-new-user-registrations-by-source-search-terms So, in my Application Controller I have following: ApplicationController.class_eval do before_filter :capture_referrer protected def capture_referrer session[:referrer] = request.env['HTTP_REFERER'] if !session[:referrer] end end In the create Action in the user controller @user.referrer = session[:referrer] and

Issues in Google Tag Manager plugin in Cordova

和自甴很熟 提交于 2019-12-04 12:31:20
Am trying to use GTM plugin for Cordova - https://github.com/kraihn/cordova-plugin-tag-manager . Am facing issues on the iOS version of my cordova app. I get warnings that the binary resource file and plist file are not found. GoogleTagManager warning: Cannot find binary resource file 'GTM-XXXXXX'. GoogleTagManager warning: Cannot find resource file 'GTM-XXXXXX.plist' GoogleTagManager verbose: loading default container from GTM-XXXXXX.json I downloaded the json file from GTM account - Admin, export for the live version. I don't see an option for download from Actions tab(as listed in some of

Using Google Analytics with FireBase + Google Tag Manager Android SDK

感情迁移 提交于 2019-12-04 12:24:49
问题 How to fire Google Analytics tag using Firebase + Google Tag Manager SDK in Android? I added the Firebase container to my assets/container folder and created a Google Analytics tag using my GA Tracking id. I have followed exactly the steps as given in this tutorial: https://developers.google.com/tag-manager/ios/v5/#introduction I trigger the appLaunch event with the below code: mFirebaseAnalytics.logEvent("appLaunch", null); How can I see this in my Google Analytics report? Please correct me

Using and querying Custom Dimensions in Google Analytics API

廉价感情. 提交于 2019-12-04 12:23:11
问题 I am attempting to query my Analytics (Universal) to receive a list of metrics sorted by a custom dimension. In July, the Google Analytics API blog announced: "Developers can use custom dimensions to send unique IDs into Google Analytics, and then use the core reporting API to retrieve these IDs along with other Google Analytics data. For example, your content management system can pass a content ID as a custom dimension using the Google Analytics tracking code. Developers can then use the

Filtering results from Google Analytics Reporting API

守給你的承諾、 提交于 2019-12-04 12:15:43
问题 I am successfully downloading results from Google Analytics using the reporting API (version 4), with the PHP client library. But I have not figured out how to correctly filter these results. I see how this would work via cURL, but not through the client library. I looked through the client library code, and there is a class method: apiclient-services/Google/Service/AnalyticsReporting/ReportRequest.php: public function setMetricFilterClauses($metricFilterClauses) I do not see any

Google Analytics file not found

主宰稳场 提交于 2019-12-04 12:12:50
I am trying to use Google Analytics in my site. I copied the code directly from the Google Analytics website and followed the instructions for embedding it into my HTML. Here is my code: <script> (function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]= function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date; e=o.createElement(i);r=o.getElementsByTagName(i)[0]; e.src='//www.google-analytics.com/analytics.js'; // this is the file r.parentNode.insertBefore(e,r)}(window,document,'script','ga')); ga('create','not giving this out');ga('send','pageview'); </script> When I load my page

Google analytics (via tag manager) loses track of adwords visitors after first pageload

送分小仙女□ 提交于 2019-12-04 11:54:08
问题 I am experiencing a very strange problem with Google tag manager (GTM), Google analytics (GA) and Google adwords. So far I am getting nowhere with solving it. The setup: We have a singe page application (backbone and marionette) and we are using GTM to push virtual pageviews to GA using standard dataLayer.push events (and also e-commerce events if this is relevant). This setup generally works fine. The problem: The problem is users coming from adwords, with a gclid tag. The first pageview for

Prevent Google analytics from gathering data in development environment, ASP.NET MVC

血红的双手。 提交于 2019-12-04 11:44:34
问题 I have an ASP.NET MVC (3) app and I've set Google analytics up. The problem is that every time I run from Visual Studio the Google script starts gathering data, which of course, skews the real results. What's the best way to prevent Google Analytics from gathering data on the development environment other that using ugly #if compiler directives on every page I want analysed? What would be a best practice? Thanks. 回答1: The best-practice advised by Google is to use a filter to remove the data