- This topic has 9 replies, 3 voices, and was last updated 2 years, 5 months ago by Ying.
-
AuthorPosts
-
October 22, 2021 at 12:19 pm #1972233John
Hello GeneratePress Help !
It’s been a while. Because everything is going so well with my site. Thank you !
I have signed up to ActiveCampaign. I want to enable site tracking. ActiveCampaign tells me that I need to install site tracking on my site. They provide a code which I am supposed to add to the footer of each page I want tracked. Well, I have far too many pages in order to do that manually.
Here is a link to their explanation: https://help.activecampaign.com/hc/en-us/articles/221493708-How-to-set-up-Site-Tracking#how-to-turn-on-site-tracking-and-whitelist-domains
Is there a way to add the site tracking code in one spot which will cover the entire site?
John Magee
October 22, 2021 at 12:21 pm #1972234LeoStaffCustomer SupportHi there,
A hook element:
https://docs.generatepress.com/article/hooks-element-overview/With the wp_footer hook should be what you are looking for:
https://docs.generatepress.com/article/wp_footer/Hope this helps.
October 23, 2021 at 9:25 am #1972955JohnThat was fast, Leo. Thank you !
I’m not sure if I got it right with creating a hook, because this appeared after “Execute PHP”:
“Unable to execute PHP as DISALLOW_FILE_EDIT is defined.”If that is a problem, would it help if I gave you access to my WP-site?
Here is the tracking code from ActiveCampaign that I am supposed to embed on all pages:
<script type=”text/javascript”>
(function(e,t,o,n,p,r,i){e.visitorGlobalObjectAlias=n;e[e.visitorGlobalObjectAlias]=e[e.visitorGlobalObjectAlias]||function(){(e[e.visitorGlobalObjectAlias].q=e[e.visitorGlobalObjectAlias].q||[]).push(arguments)};e[e.visitorGlobalObjectAlias].l=(new Date).getTime();r=t.createElement(“script”);r.src=o;r.async=true;i=t.getElementsByTagName(“script”)[0];i.parentNode.insertBefore(r,i)})(window,document,”https://diffuser-cdn.app-us1.com/diffuser/diffuser.js”,”vgo”);
vgo(‘setAccount’, ‘27184010’);
vgo(‘setTrackByDefault’, true);vgo(‘process’);
</script>John
October 23, 2021 at 10:58 am #1972996YingStaffCustomer SupportHi John,
This article should be helpful:
https://docs.generatepress.com/article/disallow-php-execution/October 23, 2021 at 12:01 pm #1973051JohnSuper fast and super helpful, Ying. Thank you.
But wait, did I understand the article that “Unable to execute PHP as DISALLOW_FILE_EDIT is defined.” is a good thing, because it is an extra layer of security?
John
October 23, 2021 at 12:20 pm #1973059LeoStaffCustomer SupportYou can only allow PHP execution in GP hooks using this snippet:
https://docs.generatepress.com/article/generate_hooks_execute_php/October 23, 2021 at 1:30 pm #1973107JohnBut do I want to overwrite PHP as DISALLOW_FILE_EDIT?
John
October 23, 2021 at 4:39 pm #1973181YingStaffCustomer SupportLeo’s snippet allows your site to execute PHP inside hook elements.
I think it’s a better solution in your case.
October 24, 2021 at 2:54 am #1973340JohnHi Ying,
Ok, I entered the snippet which Leo had recommended. And I think I did it correctly. Thank you !
John
October 24, 2021 at 10:44 am #1973814YingStaffCustomer SupportNo problem 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.