Git Product home page Git Product logo

Comments (3)

larscom avatar larscom commented on August 19, 2024

Hi,

You can add any analytics module to the angular side. For example: https://github.com/angulartics/angulartics2
There you can handle pretty much any event you want.

Don't know if its possible to add it on the chrome side, besides that, don't think you need it there either?

Good luck 👍

from ng-chrome-extension.

FSou1 avatar FSou1 commented on August 19, 2024

Oh, thx for the link, will take a look.

I have successfully added the GA to the chrome side so far. It has been a matter of:

  • Adding a separate javascript file with a snippet (it is important since Chrome runtime does not allow to execute inline scripts without some mambo-jumbo policies, so you better place your javascript snippet to the analytics.js than make it a part of the index.html);
  • Importing this file to the background page (moreover, a content script should send a chrome.runtime message to the background page if there is a need to track something).

The reason I'd like to track the chrome side of the extensions is because of some events and metrics in my content scripts. So the angular side is more about interacting with UI (e.g. popup, options), and the chrome side is helpful to catch hotkeys, runtime.messages, e.t.c.

References:

from ng-chrome-extension.

larscom avatar larscom commented on August 19, 2024

All right, glad that it worked out :-)

from ng-chrome-extension.

Related Issues (20)

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.