Skip to content

Google Analytics script is out of date #388

Closed
@jacobwoffenden

Description

@jacobwoffenden

The script here https://github.com/alphagov/tech-docs-gem/blob/main/lib/source/layouts/_analytics.erb#L1-L15 is out of data I think, it needs to be

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=<%= config[:tech_docs][:ga_tracking_id] %>"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', '<%= config[:tech_docs][:ga_tracking_id] %>');
</script>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions