beyonk-group / svelte-google-analytics

Google Analytics component for Svelte
77 stars 12 forks source link

[Bug] ga import binding error #29

Closed nico-herrera closed 1 year ago

nico-herrera commented 1 year ago

I am trying to be GDPR compliant and am using the sample code from docs.

import { GoogleAnalytics, ga } from '@beyonk/svelte-google-analytics'; <GoogleAnalytics bind:this={ga} properties={'ID'} enabled={false} />

While getting the following errors: Cannot bind to a variable which is not writablesvelte(invalid-binding) Cannot assign to 'ga' because it is an import

Is there something else that needs to be done?