Hello,
To be able to track the calls, how can I add this script just after the body tag?
<script>
(function (i,s, o, g, r, a, m) {
i[r] = i[r] || [], i["cttime"] = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
})(window, document, "script","//call.mgtmod01.com/mgtct.v4.min.js?Apk=3af0af21718ad75722b7f7dc2428e7f3f9c10432", "_mgt");
</script>
Tx a lot for your help guys !
Marine
Hi Marine,
Please refer to this post – https://kriesi.at/documentation/enfold/add-custom-js-or-php-script/#add-a-script-to-footer-section
Regards,
Yigit
Hello Yigit,
They ask me to put it just after the body opening tag, which section should I use in your the post you’ve sent me?
Txxxxxxxxxx
Hi,
Please try this in your functions.php file:
function newki75_add_custom_code(){
?>
<script>
(function (i,s, o, g, r, a, m) {
i[r] = i[r] || [], i["cttime"] = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
})(window, document, "script","//call.mgtmod01.com/mgtct.v4.min.js?Apk=3af0af21718ad75722b7f7dc2428e7f3f9c10432", "_mgt");
</script>
<?php
}
add_action('ava_after_body_opening_tag', 'newki75_add_custom_code');
Best regards,
Rikard
Tx Rikard, it works perfectly, you can close the issue.
Nice day !
Hi,
I’m glad this was resolved. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon