Google Analytics Script
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 41
- Joined: 03 Jun 2023, 17:30
Google Analytics Script
Hello,
Would this be the ideal method/location to add the Google Analytics js script into the header of every page?
1) I generated an extension and copied the zip file for it into:
/var/www/html/packages/<my-ext-name>
2) I copied the default theme into my own theme:
cp -R /var/www/html/public/vendor/shop/themes/default /var/www/html/packages/<my-ext-name>/themes/client/html/<my-theme-name>
3) I copied the template header into my extensions folder here:
/var/www/html/packages/<my-ext-name>/templates/client/html/cms/page/header.php
4) I placed the Google Analytics tracking code into:
/var/www/html/packages/<my-ext-name>/templates/client/html/cms/page/header.php
Would this be the ideal method/location to add the Google Analytics js script into the header of every page?
1) I generated an extension and copied the zip file for it into:
/var/www/html/packages/<my-ext-name>
2) I copied the default theme into my own theme:
cp -R /var/www/html/public/vendor/shop/themes/default /var/www/html/packages/<my-ext-name>/themes/client/html/<my-theme-name>
3) I copied the template header into my extensions folder here:
/var/www/html/packages/<my-ext-name>/templates/client/html/cms/page/header.php
4) I placed the Google Analytics tracking code into:
/var/www/html/packages/<my-ext-name>/templates/client/html/cms/page/header.php
Re: Google Analytics Script
Best place is in the base.blade.php which you can copy to your ./resource/views/vendor/shop/ directory:
https://github.com/aimeos/aimeos-larave ... .blade.php
See also: https://aimeos.org/docs/latest/laravel/ ... -templates
https://github.com/aimeos/aimeos-larave ... .blade.php
See also: https://aimeos.org/docs/latest/laravel/ ... -templates
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star