Archived topic
Elements Not Executing Hooks
10 replies · Started by Ronnie on March 15, 2022
Attempted to create hooks to add Clarity and Pinterest code, but hooks will not execute. How do I overcome this issue?
Updated info!
Hi there,
I only see the username and pw in the private info field so I can't tell what the issue is.
Can you copy and paste the code you are trying to add here and highlight them with the CODE button?
Okay, first time doing this. so please be patient.
MS Clarity
<script type="text/javascript">
(function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
})(window, document, "clarity", "script", "b1844x7p8v");
</script>
Pinterest
<meta name="p:domain_verify" content="b70fb14980d2537423a173559b05bb42"/>
I think I got this right,
Canty
MS Clarity
<script type="text/javascript">
(function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
})(window, document, "clarity", "script", "b1844x7p8v");
</script>
Don't know why it didn't take the first time.
Hi Ronnie,
Based on this document: https://generatepress.com/forums/topic/elements-not-executing-hooks/#post-2156067
you’ll need to add the script to your entire website’s head. The Pinterest code should also be added to the head according to this document: https://www.wpbeginner.com/wp-tutorials/how-to-verify-your-wordpress-site-on-pinterest/#:~:text=Step%203.%20Add%20HTML%20Tag%20to%20Your%20WordPress%20Website
With that said. are you hooking your Hook Element to wp_head as such?: https://share.getcloudapp.com/5zuL5WoO
Are you also displaying it to the Entire Site?: https://share.getcloudapp.com/geumY8Kd
If so, and they aren’t getting hooked, may we have the link to the site in question? Kindly use the private information field as well.
Hope to hear from you soon.
Updated Info
Hi Ronnie,
Is the Hook: MS Clarity code supposed to work for all users/visiters?
If so, you should leave its user filed blank:
https://www.screencast.com/t/iTNVL2XiX4k
The Pinterest hook is working:
https://www.screencast.com/t/2NgyNlAGIYR
No, I don't think that it is.Question never raised; therefore, I delete the 'Administrator' rule.Thank you for Pinterest Hook. Will MS Clarity work?
Pinterest still will not verity code.
Hi Ronnie,
I can see that MS Clarity’s code has been added: https://share.getcloudapp.com/z8uLwNGX
If setup correctly, it should work: https://docs.microsoft.com/en-us/clarity/clarity-setup
Moreover, I can also confirm that the Pinterest hook works as well.
Perhaps this thread may help?: https://wordpress.com/forums/topic/my-wordpress-site-will-not-verify-with-my-pinterest-site/#post-3450210
If either of the two doesn’t work, it would be best to reach out to the support of these for more assistance since the codes to make them work are already properly hooked in the right location - head.
Hope this clarifies. :)