• Resolved meike297

    (@meike297)


    Hello, I use a code from GetyourGuide to track my affiliate link bookings. This code is inserted into the header.php according to the instructions from GetyourGuide. This also works, but unfortunately there is the problem that every time my theme is automatically updated, this code will be removed from the header.php. Unfortunately, all the widgets then disappear and I have to insert the code again and again. That’s why I would like to use your plugin. Can you please confirm whether this will work? The code would be as follows:

    <!-- GetYourGuide Analytics -->

    <script async defer src="https://widget.getyourguide.com/dist/pa.umd.production.min.js" data-gyg-partner-id="HDP3ELY"></script>

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    Sure, you can add this as a Content snippet and set to ‘display in site head’.

    Thread Starter meike297

    (@meike297)

    Thank You but I don’t find This Settings. I only can put this code above and Set ?type PHP“?

    Hey @meike297,

    You need to explore the plugin in more detail to understand how it works and what @bungeshea shared with you.

    In short, one of the following will solve your issue:

    1. Go the Content (HTML) tab and create a code snippet that looks like this.
    2. Go the Functions (PHP) tab and create a code snippet as shown below.
    function wp_widget() {
    ?>
    <script type="text/javascript" async defer src="https://widget.getyourguide.com/dist/pa.umd.production.min.js" data-gyg-partner-id="HDP3ELY"></script>
    <?php
    }
    add_action('wp_head', 'wp_widget');

    Important: If you theme is deleting your HTML (header) code every time the theme is updated, then there’s something wrong with your theme. The theme developers need to fix that. Our theme does not do that. Highly recommend contacting them.

    Cheers ??

    Thread Starter meike297

    (@meike297)

    Hello! Thank you! Yeah I contacted them already and they didnt say nothing about that. Just that I need a plugin for it. Thank you for your help, I will try this and maybe contact you again. Best regards, Meike

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.