• Hi there,

    I am using WordPress with Shopify Buy Button to sell several products. Since there are several “Add to Cart” buttons on the home page (without taking the user to individual product pages) and I’m not using WooCommerce, how can I use CSS Selectors to trigger the “Add to Cart” event pixel? Is there a way to use “Link Clink” instead of “CSS Selector” to accomplish this?

    The site is not live yet, so I cannot share a link yet.

    When I use Chrome’s Inspect window and select “Copy Selector,” here’s what it gives me: body > div > div.shopify-buy__btn-and-quantity > div.shopify-buy__btn-wrapper > button

    When I use the Copy CSS Selector Chrome browser extension, it spits out: div#themify_builder_content-8 > div.themify_builder_row.themify_builder_8_row.module_row.module_row_1.module_row_8-1.clearfix.gutter-default.col_align_top.tb_section-purchase.fullwidth-content

    Can you help?

    Thanks,
    Victor

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Antonino Scarfì

    (@antoscarface)

    Hi,

    you could use CSS selector, but you need to identify an unique CSS class or CSS ID to specify.

    I give you an example for woocommerce add to cart: https://snag.gy/5ykAMT.jpg

    Use Google Dev Inspector to help you (right click on add to cart button -> Inspect Element).

    I hope it can help.
    Best

    Thread Starter retrograde32

    (@retrograde32)

    Hi,

    So in the example, the only part of the code that is needed to be inserted into Pixel Caffeine is “add_to_cart_button”?

    Thanks!

    Plugin Author Antonino Scarfì

    (@antoscarface)

    Hi,

    yes, in this example you should add “.add_to_cart_button” as CSS selector, so the plugin trigger each click on .add_to_cart_button element and it fires the pixel.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Facebook Pixel > WP > Shopify Button’ is closed to new replies.