我正在尝试在表单中添加新的谷歌分析事件。所以我有这样的事情:
<a href="#" name="button1" onclick="dataLayer.push({'event': 'button1-click'});" >Button 1</a>
Run Code Online (Sandbox Code Playgroud)
到目前为止,一切都很好。但我收到这个奇怪的聪明错误:
Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "C:\wamp\www\mycookit/themes/cookit/delivery.tpl" on line 164 "dataLayer.push({'event': 'event_name'});" - Unexpected ": ", expected one of: "}" , " "' in C:\wamp\www\mycookit\tools\smarty\sysplugins\smarty_internal_templatecompilerbase.php on line 431
Run Code Online (Sandbox Code Playgroud)
有人遇到过这种情况吗?是prestashop吗?只有我吗?
我在其他网站上这样做从来没有遇到任何问题,但在 prestashop 或 smarty 上都没有。
| 归档时间: |
|
| 查看次数: |
2033 次 |
| 最近记录: |