How to add Google Analytics tracking ID on Laravel Livewire (TALL stack) -> Git -> Forge -> Digital Ocean

Greetings All,

I have successfully deployed a working App for our Organization, built on Laravel TALL Stack (Tailwind, AlpineJS, Laravel & Livewire) deployed via a GitHub repository thru Laravel Forge, Hosted on Digital Ocean Servers.

I am in the process of adding Google Analytics to the site.

I’ve done the recommended add a analytics.blade.php file containing my site specific “Google Site Tag” (gtag.js) script, and added that to the appropriate file via @include() function.

Just not seeing where on Forge or Digital Ocean I can add the accompanying Tracking ID provided by the Google Ads campaigns page.

Any help would be greatly appreciated.

Thanks in advance! :)

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi there @jochantrelle,

I believe that it is enough to include the Google Tracking tag to your Laravel views as you’ve done already, there should be no changes that you need to do on the server-side.

Regards, Bobby

IF you want to add Google analytics to your laravel app then folloe this article - Article