Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Best Practices for Implementing Google Analytics Code in Version 2.x

default discord avatar
kouohhashi2 years ago
1 2

I want to insert the Google Analytics code in version 2.x, what is the most recommended way to do this?

Is it best practice to copy and paste it into the head section?

  • Selected Answer
    discord user avatar
    zubricks
    2 years ago

    Hey @kouohhashi you could take a look at our website repo for some pointers. We've implemented GA and it works as expected (if you're using NextJS on the frontend that is).

    2 replies
  • default discord avatar
    kouohhashi2 years ago

    Thanks!

  • default discord avatar
    Meet573 months ago

    @zubricks
    Please update all the website repo pointers.

  • default discord avatar
    andrei-aceweb9 months ago

    Hi! I'm wondering about the same, and what is the best practice in the latest version of payload? (3.41.0)
    Is there any best-practice example for that? The link in the accepted answer is not valid anymore unfortunately

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.