• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Problem with Google Analytics
PostPosted: Wed Dec 18, 2019 3:53 am 
Offline
New Member
New Member

Joined: Wed Dec 18, 2019 3:49 am
Posts: 1
Hello

I tried to add Google Analytics code but it has this error

\$1:
Syntax error in template "template:appdata;tmp_template" on line 21 "function gtag(){dataLayer.push(arguments);}" - Unexpected ".", expected one of: "}"
No content blocks defined in template


Anyone know how to fix this?

Thanks


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Problem with Google Analytics
PostPosted: Wed Dec 18, 2019 3:57 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Feb 25, 2009 4:25 am
Posts: 968
Location: Victoria, BC
In CMS Made Simple, curly braces {} are reserved for Smarty functions. Because your script uses them, you will need to do one of two things to avoid this:

option one:
wrap the script in {literal} script goes here {/literal} tags

option two:
make sure the script has spaces after any opening curly brace, e.g.:
\$1:
{ datalayer.push(arguments); }

instead of
\$1:
{datalayer.push(arguments);}

and anywhere else in the script they appear.

_________________
Not getting the answer you need? CMSMS support options


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: johnboyuk1, velden


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting