GithubHelp home page GithubHelp logo

enonic / app-google-analytics-old Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 3.0 4.83 MB

App for integration with Google Analytics

License: Apache License 2.0

JavaScript 66.22% HTML 2.96% Java 20.22% CSS 10.60%

app-google-analytics-old's People

Watchers

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

app-google-analytics-old's Issues

Non-administrator get 403 error on authenticate endpoint

Users without admin rights get a 403 error on authenticate endpoint when opening the widget, but no error message outside of the browser console.

We want content editors to be able to view the analytics of their own content.

Add new tracking script to the app

We want to upgrade to the new GA analytics id. The current UA tag is not longer supported.

The processor needs to be updated with the new script.

Also handle if the app is intalled without a GA id inserted in the app settings.

The app wil temporarly support both the old and new tag. (The widget still relies on the old google analytics UA id)

GA Data v1 api new api access

The recommened way to access the new apis google are working on is by using Auth0.
See this client side setup: https://developers.google.com/identity/protocols/oauth2/javascript-implicit-flow

It seems we might be able to connect a service worker to handle the authentication step:
https://developers.google.com/identity/protocols/oauth2/service-account

This is all related the the new Google Analytics Data API v1 https://developers.google.com/analytics/devguides/reporting/data/v1

Documentation out of date

Google has changed the layout of their pages, so the documentation for this app is a bit "unhelpfull" at the moment.

I recommend going trough the setup again, taking new screenshots for the documentation.

Page contributions check might fail

In your filter, you're checking if the pageContributions.headEnd is falsy.

pageContributions.headEnd might be a string. A non-empty string would return truthy, which would make the filter crash, since you're calling .push later on (a string doesn't have that method).

Get rid of inline scripts

New header settings could deny inline scripts.
Could we change the analytics app to not have any inline scripts?

New version of google analytics

The version of the google analytics used in this app is considred legacy. Google analytics 4 has breaking changes.
Can the app be upgraded to support the newest version?

Fetch GA scripts server-side

The app is now using three remote GA scripts: one to fetch GA API and two (one, two) to render the map. (The last two will only be used if ga.mapsApiKey is set in the config. )

After implementation of CSP in Content Studio, these scripts will no longer work.

Replace client-side requests to these scripts with requests to local services which will in turn fetch data from the actual sources and return them to the client.

Also, since it's the validity of config which decides whether to append the scripts (and which scripts to append), we can make these scripts a part of the template and get rid of "dynamic appending" client-side. Then we don't need id on the widget tag etc.

<widget>
    <script data-th-if="${configValid}" data-th-src="${portal.serviceUrl({'_path=ga-script-1'})}"></script>
    <script data-th-if="${useMapsApi}" data-th-src="${portal.serviceUrl({'_path=ga-script-2'})}"></script>
</widget>

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.