Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(analytics): GA analytics tracker from ENV variable #84

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vire
Copy link
Collaborator

@vire vire commented Jun 25, 2017

move analytics logic into background page

Based on process.env.NODE_ENV either GA_TRACKER_DEV or GA_TRACKER_PROD is loaded from .evn file.
Also moved the analytics from template appending mechanism to background page because of clashes
with host site GA. More details in SO answer
https://stackoverflow.com/questions/10285886/chrome-extension-adding-external-javascript-to-current-pages-html?answertab=active#tab-top

Closes #52

…lytics logic into background pa

Based on process.env.NODE_ENV either GA_TRACKER_DEV or GA_TRACKER_PROD is loaded from .evn file.
Also moved the analytics from template appending mechanism to background page because of clashes
with host site GA. More details in SO answer
https://stackoverflow.com/questions/10285886/chrome-extension-adding-external-javascript-to-current-pages-html?answertab=active#tab-top

Closes realreality#52
@vire vire requested a review from michalbcz June 25, 2017 16:52
@codecov-io
Copy link

codecov-io commented Jun 25, 2017

Codecov Report

Merging #84 into master will decrease coverage by 0.17%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #84      +/-   ##
==========================================
- Coverage   15.25%   15.08%   -0.18%     
==========================================
  Files          14       14              
  Lines         354      358       +4     
  Branches       53       53              
==========================================
  Hits           54       54              
- Misses        284      288       +4     
  Partials       16       16
Impacted Files Coverage Δ
src/js/components/App.vue 0% <ø> (ø) ⬆️
src/js/contentscript.js 0% <0%> (ø) ⬆️
src/js/components/Availability.vue 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 249e6ce...c03fdc7. Read the comment docs.

@vire vire force-pushed the externalize-analytics-usage branch from 45904bd to dfb7d25 Compare June 25, 2017 18:00
Added $track instance method to enable passing event to background page for pushing to analytics
@vire vire force-pushed the externalize-analytics-usage branch from dfb7d25 to c03fdc7 Compare June 25, 2017 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants