• Resolved taco100

    (@taco100)


    Hello and thanks for an awesome plugin.

    When sending a user to the cart with the ?add-to-cart=[product no.] parameter at the end of the URL (to add the product directly to the cart), the subsequent redirect that happens right after the page loads removes all UTM and other parameters we’ve added.
    We really need those parameters for tracking purposes, Is there a way to tell WooCommerce to keep them when redirecting the user?

    Thanks!
    Tal

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @taco100,

    Thank you for reaching out and for your kind words about our plugin. I understand how important it is for you to keep the UTM parameters for tracking purposes.

    I’m afraid it will not be possible to add URL parameters to ?add-to-cart=XXXX. The behavior you’re experiencing is due to how WooCommerce handles redirects after adding a product to the cart. By default, WooCommerce performs a redirect to the cart page, and this process might not preserve the UTM parameters.

    You may be able to have a solution custom-developed with modifications to the WooCommerce core code. However, writing or providing custom code is not within the scope of our support policy. For development and custom coding questions, it’s best to ask for insight related to those on either the WooCommerce Advanced Facebook group or the WooCommerce Community Slack. You can also seek help from the following:

    I wish I could help more, but hopefully, this gets you going in the right direction to get the job done.

    Thread Starter taco100

    (@taco100)

    Thanks Afzal for your kind reply.

    I totally understand.

    It’s weird but meanwhile wev’ve discovered some old PHP code in the website and when we removed it (belong to some old feature), it seems to keep he UTM parameters ??
    Still running tests to make sure…
    Tal

    Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hello @taco100,

    I’m glad to hear that you’ve identified some old PHP code that could be causing the issue.

    Removing or updating outdated code can often resolve unexpected issues. Keep conducting your tests and if the problem persists or if you encounter any new issues, please don’t hesitate to update us.

    We’re here to help you.

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘“?add-to-cart=XXXX” removes all UTM parameters’ is closed to new replies.