const mixinafGoogleAnalytics::GoogleAnalytics

afGoogleAnalytics::GoogleAnalytics

(Service) - Renders the Google Universal Analytics script and sends page views and events.

accountDomain

Source

abstract Str? accountDomain()

Returns the domain used to setup the google script.

accountNumber

Source

abstract Str accountNumber()

Returns the account used to setup the google script.

pageViewRendered

Source

abstract Bool pageViewRendered()

Returns true if the page has already rendered Javascript to send a page view event.

This allows individual pages to send page views for canonical URLs and a layout component to send general page views if the page hasn't done so.

renderEvent

Source

abstract Void renderEvent(Str category, Str action, Str? label := null)

Renders Javascript to send an event to google analytics.

renderPageView

Source

abstract Void renderPageView(Uri? url := null)

Renders Javascript to send a page view to google analytics. If url is given then it should start with a leading /, e.g. /about