Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter tarikbisevac

    (@tarikbisevac)

    I have made a progress but still I have an issue on upsell and downsell pages.

    Eve tough I append utm tags in url, they are not displayed in woocomemrce.

    I am still waiting for your help.

    Here is the code for reference:

    `<script>

    function addQueryParamsToLinks() {
    if (window.location.pathname.includes(‘oto1’) || window.location.pathname.includes(‘oto2’)) {
    const originalQuery = localStorage.getItem(“originalQuery”);
    if (!window.location.search.includes(originalQuery.slice(1))) {
    window.location.search += originalQuery.replace(“?”, “&”);
    }
    } else {
    const links = document.getElementsByTagName(“a”);
    const forms = document.getElementsByTagName(“form”);
    const queryParams = window.location.search;
    localStorage.setItem(“originalQuery”, queryParams);
    console.log(“links”, links)
    console.log(“forms”, forms)
    for (const link of links) {
    link.setAttribute(“href”, ${link.getAttribute("href")}${queryParams});
    }

    for (const form of forms) {
    form.setAttribute(“action”, ${form.getAttribute("action")}${queryParams});
    console.log(“form”, form)
    }
    }
    }
    addQueryParamsToLinks();

    </script>

    Plugin Support CartFlows Team

    (@cartflows)

    Hello @tarikbisevac

    Thank you for getting back to us!

    Can you please let me know how you are adding the above JS script on your upsell/downsell pages?

    – Are you using any WordPress action/filter to add it on the upsell/downsell pages?
    – Have you checked and verified that is there any JS error in the browser’s console tab?
    – Is the JS script getting loaded properly in the desired section of the web page?

    I hope this clarifies you.

    I am looking forward to hearing from you.

    Thread Starter tarikbisevac

    (@tarikbisevac)

    I am adding this script to Elementor Custom code. It works across the whole website, but it doesn’t work on upsell and dowsnell pages. I added it manualy.

    There are no errors on the pages. Is there any way to have utm tags on upsell and downsell pages?

    Plugin Support Sravan Bhaskaravajjula

    (@bhshravankumar)

    Hello @tarikbisevac,

    Usually, the tracking codes are added to the header or footer of a webpage.

    Upsell/downsell pages don’t have a header/footer so the UTM tracking code is not working.

    We advise you to continue with manually adding the code through our page settings custom code option or you need to add a header/footer to the CartFlows page by changing the page layout type to ‘Default’.

    Please refer to this screenshot.

    Hope this helps.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘UTM tags do not display on upsell and downsell pages’ is closed to new replies.