digitalwithyou / craft-facebook-conversion

Craft CMS plugin to send web events directly to Facebook
https://digitalwithyou.com/en/plugins/facebook-conversion/getting-started
Other
0 stars 3 forks source link

Page View Event for Cached Pages #18

Closed jasonmckinney66 closed 2 years ago

jasonmckinney66 commented 2 years ago

I'm implementing your suggestion for firing events on cached pages using JS to retrieve the partial from a folder titled /templates/dynamic. This works beautifully when implemented from within a template where the folder can be accessed.

When implementing Page View which needs to fire on every page, I would rather not go in to every template and add the JS call. Locating the call within _layout will not work because /templates can't be accessed from there - only /web. Any suggestions for adding this globally?

Diewy commented 2 years ago

Would adding it to a global Javascript file and adding that file to your template work for you?