realreality / reality-plugin

Real reality chrome plugin
Apache License 2.0
8 stars 2 forks source link

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

Open vire opened 7 years ago

vire commented 7 years ago

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

codecov-io commented 7 years ago

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% <ø> (ø) :arrow_up:
src/js/contentscript.js 0% <0%> (ø) :arrow_up:
src/js/components/Availability.vue 0% <0%> (ø) :arrow_up:

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.