Giter Club home page Giter Club logo

meteor-iron-router-ga's People

Contributors

bitomule avatar fvilers avatar javascriptlove avatar manybothans avatar maximdubrovin avatar reywood avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

meteor-iron-router-ga's Issues

No GA tracking code being added?

I've just deployed an app to meteor (http://indxd-testdrive.meteor.com/) and am not seeing the GA tracking code added.

I've added reywood:iron-router-ga to my project, configured the router with trackPageView:true, and added my tracking code to settings.json. I deployed with the --settings switch and am seeing the GA tracking ID in the public settings (via "view source"). I also see the GA script include.

The GA Tracking ID control panel, however, still lists my site as "Status: Tracking Not Installed"

Would appreciate any assistance you can provide!

Its not tracking all routes

We used this package in a mobile app that we build using meteor and cordova. Now, its only tracking routes that are defined in "routes.js" globally. Most the routes in our app are defined in separate individual modules. Ex: "browse" module has a route file "r_browseroutes.js" defined in "\client\views\modules\browse\helpers" directory. A sample route defined in this file is:

Router.route('/browse-categoryselection',function(){
    this.render('browse_categoryselection',{
        name : 'browse.categories',
        data : {
        }
    });
});

The GA is not tracking these routes. Not sure whether its GA issue or package issue.

Build fails on CircleCi

I can't explain why... But adding this package to my project will cause a build of a docker image on CircleCi to fail. I've been happily sending my commits to CircleCi, which then grabs the latest and using the meteorhacks/meteord image, goes and builds a docker image of my app for testing and later deployment. However, when I add this package I get an error like the following:

/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/fibers/future.js:245
                        throw(ex);
                              ^
Error: EINVAL, chown '/tmp/.tmpywvy0q/reywood_iron-router-ga-0.6.0'
    at Object.Future.wait (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/fibers/future.js:395:16)
...

There's a good ~25 or so other packages I can add or remove with no consequence. It's only this one and the numerals:numerals packages that cause this problem (either of them will give similar errors).

So, any idea what's happening to cause this? For what it's worth it also appears isolated to CircleCi's build env (which utilizes lxc). Unfortunately, I don't know enough about what's truly happening under the covers to be able to provide more info.

Set configuration with .config({ ... })

As a developer, I would like to have the option of using system environment variables to load configuration.

I'm not looking to remove iron-router-ga's use of Meteor.settings, but instead looking to add an alternative use of something like IronRouterGa.configure({ ... }) or Router.configure({ ... }).

The reason for this is because it seems like there is no way that I can find to set the Meteor.settings from within the codebase and have it get to the client before this package loads.

It also seems pretty common (perhaps a de facto standard) for packages that need configuration to load it using a .config({ ... }) method.

ga var is not available in server-side code... possibly update readme to reflect this.

Great package. I think you might want to clarify something though in your readme.

It says you will have access to the ga function anywhere in your Meteor code, but I'm finding that ga is only recognized in "client" code.

As someone just discovering the package I assumed this meant your package adds the ga global variable to the entire Meteor application so that it can be called from "server" code too, but I'm finding ga isn't defined in "server" code. Try accessing it in the Meteor Shell for example. It would be awesome if this were the case, then we could add GA events for anything happening on the server side too - which sometimes can be something initiated by the client, but isn't necessarily associated with a button click or UI transaction (e.g. some delayed or repeated action).

So it looks like you've added the standard Google Analytics browser var ga and it's accessible on the client-side only. This is still awesome, but you may want to update your readme as this confused me for a while. With that said, I'm also an analytics newb.

Thanks!

This package breaks orionjs

When adding this package, the admin interface in Orion (for collections) fails.

pathFor couldn't find a route named "collections.products.index"

Globa trackPageView doesn't work

Adding trackPageView to the Router.configure options doesn't work for me.

Debugging my Route calls shows that you only check the passed in options for that route, not the global ones on the configuration object.

Analytics Not reporting.

I recently used this package with iron-router on Meteor 1.03. I launched the app with meteor deploy using the setting.josn. The Google analytics script tag does show up in the head but the tracking snippet is not found and GA is not reporting. Here is the site http://tabletlisting.com/.

Google Analytics don't find the track id

I can't seem to get GA work. GA complains about that no track id is found. I'll go through what I have done.

  1. Created a Google Analytics account.
  2. Ran mrt add iron-router-ga
  3. Added trackPageView: true to the options in Router.configure().
  4. Added a settings.json to the root of the application with the JSON below:
{
    "public": {
        "ga": {
            "id": "UA-XXXXXXX-Y"
        }
    }
}

I use meteor-up with phantomJS and the spiderable package. I can read the public meteor settings if I do a curl -i http://my-adress.com:

screen shot 2014-07-25 at 14 50 44

I can see this in my resources tab in the developer tools:
screen shot 2014-07-25 at 17 28 57

Something is fishy. Is there something I have forgotten?

Update to iron router 1.0

I want to use iron router 1.0 but I can't as this package has a dependency on old iron router. Is this easy to fix?

Pageview events not sent with Meteor 0.9.4

I am running Meteor 0.9.4 via mup, which pulls in settings.json. Everything seems to be set up correctly; my settings have the correct GA ID (and no settings other than ID) and my page is pulling in the Analytics JS. If I execute the following command in the Chrome debugger:

window.ga('send', 'pageview');

... I can see the pageview event on Google Analytic's realtime dashboard. Iron router configuration code is:

Router.configure ->
    trackPageView: true

However, if I visit any pages and don't manually send the pageview event, the event is not sent.

Page view tracking with custom page name

Is there any way to specify the name that is being sent for a page view instead of using the path? For example, when loading the path /list/:_id I would like to track this as a "list" page view. Currently /list/:_id is being sent to Google Analytics as the page name.

Thanks

Using Meteor.userId() as the user identifier

So Google Analytics allows to track users with a custom app-defined user id. Using this feature, we could track users cross-devices.
Plus, unless I missed anything, it doesn't sound complicated:

    function initTracker() {
        var createOptions = gaSettings.create || 'auto';

        if(createOptions.useMeteorUserId) {
            delete createOptions.useMeteorUserId;
            if(Meteor.userId()) {
                createOptions.userId = Meteor.userId();
            }   
        }

        window.ga('create', gaSettings.id, createOptions);
    }

Exclude Certain Users From Being Tracked

Is there a way to disable page view tracking for certain logged-in users (e.g. admin users)? I tried this but it threw an error about not being able to use Meteor.userId in a publication, which confused me since I wasn't doing either.

this.route('home', {
    path: '/',
    trackPageView: (Meteor.user() && Roles.userIsInRole(Meteor.user(), ['admin']) ? false : true
});

Any ideas?

Problem in cooperation with iron-routers "ensureSignedIn" Plugin

Seems not to work with the iron-router plugin 'ensureSignedIn'.

My rule:

Router.plugin('ensureSignedIn', {
  except: ['frontpage','logout', 'termsOfUse', 'atSignIn', 'atSignUp', 'atForgotPwd', 'atResetPwd']
});

As soon as i add "reywood:iron-router-ga", all pages requires login.

debugging approach?

I've installed the plugin and setup a UA account but don't get any events sent to GA from iron:router page views.
just wondering what other steps i can take to debug?

settings are reading OK
image

image

image

when I tried google's own analytics debugger it picks up my GA ID fine

I'm using the GA realtime dashboard to track things.

in the router I also have my own onRun block - but removing that doesn't change anything.

Meteor.startup ->
  if Meteor.isClient
    Router.configure
      trackPageView: true
      layoutTemplate: "ionicLayout"
      onRun: -> Trix.page()

triggering events manually from the console works and additionally I see a user in the GA dashboard then.

image

Experiments: Not all users being tracked.

I've set the experiment quota to 100% of users. However I'm only seeing 1/10th of my visitors in the "experiment sessions" results.

Manually accessing the website on different browsers yields the A/B variation. So I can see it working.

However the experiments code validation says it is not finding the code on the site.

Not tracking in Google Analytics

I'm having issues with this library not tracking on Google Analytics. I tried adding the script manually and while this works it doesn't track the iron router path changes. I can verify that analytics.js is loaded on the client and the account key is present in Meteor settings. Is anyone else having issues like this?

Multi-arm bandit experiment

Hey there, I noticed within your code:

if (chosenVariation === cxApi.NO_CHOSEN_VARIATION) {
 +            chosenVariation = Math.floor(Math.random() * variationCount);
 +            cxApi.setChosenVariation(chosenVariation, experiment.experimentId)
 +        }

This part randomly selects an chosen variation if the user has not been exposed to an experiment yet. However this does not take advantage of Google's automatic multi-arm bandit algorithm which automatically sends traffic to the best performing variation does it?

https://support.google.com/analytics/answer/2844870?hl=en

User ID - Web Tracking

Hi guys,

I'm a newbie to ga, so I'm probably stuck with some basic problems. My question here is how ti implement User ID for web tracking like in example:
https://developers.google.com/analytics/devguides/collection/analyticsjs/user-id

I understand that when app is creating global ga we need to provide User ID if we want to track users. But, basically this is a iron-router-ga part of the code so I cannot change this.

So my question here is how to do this and what is a best practice to do this?

Thanks

Rewrite as IronRouter plugin

It seems that the code currently overwrites Router.route, whereas it would seem a lot simpler/predictable to just provide an IronRouter plugin.

Meteor.settings alternate implementation, easier set up please

Thanks for providing this package.
As a newbie to meteor I found it very frustrating to find documentation for Meteor.settings.
IMHO the set up would be much cleaner if the "tracker id" was just defined in Router.configure . Or atleast provide both options with Meteor.settings be an advanced option.

Am I missing something? Is there a reason the tracker code must be set in a settings.json ?

PS. To anyone else lost and reading this, run:

meteor --settings settings.json
or
meteor deploy domain.com --settings settings.json
... yes every time you deploy or run)

How to programatically override GA site ID?

Thanks for creating this package!

Is it possible to programmatically override the GA ID that is set in the config? If so, in which file should that be placed?

The use case is that I need to specify multiple different GA tracking IDs, stored in different properties in my config file, and need to use JavaScript to switch up which one is used so that only the correct one is used.

I've tried creating a file at client/lib/ga.js with the following code ga('create', mySiteIdVar, 'auto'); but it did not override the GA ID set for this package within the config.

Problem with uncorrect Router.route override

While investigating a bug reported for Iron Router i18n (digitalascetic/iron-router-i18n#66) I found out that the bad behavior is caused by a wrong override of Iron Router Router.route method made by metor-iron-router-ga.

The "signature" of this method is Router.prototype.route = function (path, fn, opts) because it can be called with options as a second argument or with a function as the second argument and options on the third, meteor-iron-router-ga is just support the first type of call overriding the method as: Router.route = function route(name, options).

This is causing Iron Router i18n problems as it uses the complete "signature" for override but it could also cause problems to other people using the second type of call (path, function, options).

How to use multiple tracking codes in multiple pages?

Hello!

Is it possible to track multiple pages with multiple tracking codes?

E.g.:

Subpage 1 : Seller of Cars
Visitors on these pages should be tracked with trackingcode 1

Subpage 2 : Seller of Gifts
Visitors on these pages should be tracked with trackingcode 2

Is this possible?

Enable warning message if "ga" is not found

Great plugin, but as a new Meteor user, it would be fantastic to know if my settings have been properly loaded.

I did not properly place the GA id in the "public" section of my Json config. Was a bit of a pain to diagnose. Would have been great to see an error:

"Iron Router GA was not found, please check to make sure you have defined it in the public part of your settings.json".

Great plugin otherwise, running on www.SkyRooms.io ๐Ÿ—ก

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.