• Resolved tcamberlin

    (@tcamberlin)


    Hi,

    I created a popup with a simple text and link to an internal page (for white paper download) :

    <h1 style="text-align: center;">Téléchargez notre dernier livre blanc</h1>
    <p style="text-align: center;">Seize pages largement illustrées et de ...</p>
    <p style="text-align: center;"><a class="button" href="https://URL.com/livre-blanc/">Télécharger</a></p>

    The behaviour of the popup is ok except that I want it to stop displaying once user has clicked on my custom link.

    I found this piece of code on github that I adapted to my popup id, but I see no change in the behaviour :

    /**
     * Custom conversions links on WordPress Popups Plugin
     * https://www.ads-software.com/plugins/popups/
     * */
    jQuery('#spu-4456 a:not(".spu-close-popup")').click(function(){
        window.SPU.track(4456, true);
        window.SPU.hide(4456);
    });

    https://www.ads-software.com/plugins/popups/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Damian

    (@timersys)

    That code is correct. It all depends where you entered that code, if you have others js errors, etc

    Share your site and I can take a look

    Thread Starter tcamberlin

    (@tcamberlin)

    Hi Damian,

    Thanks for your pront email. Here is the website on which your plugin is installed.

    netino.fr

    The JS code is here : https://netino.fr/wp-content/plugins/popups/link-tracking.js

    Thanks.

    Plugin Author Damian

    (@timersys)

    Git I updated the gist https://gist.github.com/timersys/7facec9c80935a0df1c6 , I would recommend pasting the code inside any of your theme js files , or adding the new file in your theme.

    Every time the plugin will update your changes will be lost. You should never update plugins directly for that reason.

    Thread Starter tcamberlin

    (@tcamberlin)

    Thanks Damian.
    I did the update but the behaviour is the same. The popup dispays even after clicking on the custom link.

    Note that I have another issue : in administration, popup settings cannot be saved. Maybe that’s the same problem.

    I’ll dig further and keep you posted. If you have an idea too…

    Thanks.

    Plugin Author Damian

    (@timersys)

    Again move it away from the plugin. Try adding that code in gdl-scripts.js from your theme, right after
    jQuery(document).ready(function(){

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Can't disable popup display after click on custom link’ is closed to new replies.