ember-fastboot / ember-fastboot/fastboot-app-server

script tag in index.html

Open
#90 2 comments 3 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
140
Forks
70
PR merge metrics
No merged PRs in 30d

Description

Hi,

we are in the process of enabling our ember app for fastboot. So far it works very well when using `ember serve`, but it's not yet working with fastboot-app-server: We have a script tag in our index.html to load google analytics as suggested from google at https://developers.google.com/analytics/devguides/collection/analyticsjs/

```html

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-XXXXX-Y', 'auto');

```

When using `ember server` we can then later on access the ga object as `window.ga` but when accessing the page via fastboot-app-server, this results in `TypeError: window.ga is not a function`. Can you help me fix this or just indicate where I missed something in the docs? I would be very grateful for your help!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.