Answers for "google analytics code"

Go
0

where to add google analytics code

The Google Analytics tag should be added near the top of the <head> tag and 
before any other script or CSS tags
Posted by: Guest on June-05-2021
0

google analytics kirby

Yes, like this:

<?php if(!cookie::exists('accepted')) {
  cookie::set('accepted', 'true', 1440);
}
?>

This code checks if the cookie with the name “accepted” has already been set, if not, the cookie is set with the value “true” and a lifetime of 24 hours. For more options, see the docs.

You can check if the cookie has been set with

<?= cookie:get('accepted') ?>

Hope this helps.
Posted by: Guest on April-15-2020

Code answers related to "google analytics code"

Browse Popular Code Answers by Language