Support » Plugin: Async JavaScript » tarteaucitron.js

  • Resolved arnaudv33



    I just installed tarteaucitron.js in order to be GDPR compliant and I’ve got on issue because even if I exclude it, it’s still not working. I used the official website to install it:

    Here is what I added in functions.php (child theme):
    add_action( ‘wp_enqueue_scripts’, ‘tarteaucitron_load’ );
    function tarteaucitron_load() {
    wp_enqueue_script( ‘tarteaucitron’, ‘/tarteaucitron/tarteaucitron.js/tarteaucitron.js’ );
    add_action( ‘wp_head’, ‘tarteaucitron_init’ );
    function tarteaucitron_init() {
    “hashtag”: “#tarteaucitron”,
    “highPrivacy”: false,
    “orientation”: “top”,
    “adblocker”: false,
    “showAlertSmall”: true,
    “cookieslist”: true,
    “removeCredit”: false

    add_action( ‘wp_footer’, ‘tarteaucitron_services’ );
    function tarteaucitron_services() {
    tarteaucitron.user.analyticsUa = ‘XXXXXXXX’;
    tarteaucitron.user.analyticsMore = function () { ga(‘set’, ‘anonymizeIp’, true); };
    (tarteaucitron.job = tarteaucitron.job || []).push(‘gtag’);
    (tarteaucitron.job = tarteaucitron.job || []).push(‘youtube’);
    (tarteaucitron.job = tarteaucitron.job || []).push(‘recaptcha’);

    In the console, it’s displaying the error below:
    Uncaught ReferenceError: tarteaucitron is not defined.

    Could you please help me?

    • This topic was modified 3 years ago by arnaudv33.
Viewing 4 replies - 16 through 19 (of 19 total)
  • Thread Starter arnaudv33


    It doesn’t change anything but I identified the problem. The instagram widget isn’t working anymore. Here is a demo of the theme I’m using with the intagram widget at the bottom on the page:

    Please note I still have an issue when I add


    at the end of the link. I must disable both plugin (AO & async) to be able to see it whereas when it’s activated it only shows the instagram button, no images are displayed.

    Plugin Author Optimizing Matters


    well, you’ll have more exclusions to do in that case I guess, instagram-slider-widget/assets/js/ and/or ashe-pro/assets/js/custom-plugins.js maybe? go for some trial & error, you’ll get there 🙂

    Thread Starter arnaudv33


    You are the best ! Thank you very much for your help!

    Plugin Author Optimizing Matters


    you’re welcome, feel free to leave a review of the plugin and support here! 🙂

    you beat me to it 🙂

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘tarteaucitron.js’ is closed to new replies.