Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Adding Custom Code to "Add To Cart" Button


blairmade

Question

Site URL: https://www.blairmade.com/

I am attempting to integrate Pinterest conversion tags with my Squarespace site. I've gotten two of them working, but still struggling with the AddToCart event. I tried adding code into the header to fire when the "Add to Cart" button was visible, but it isn't finding the button, even when it is there. Does anyone have any tips with how they've been able to integrate this pinterest tag? I am sure I am just missing something obvious, so any help is greatly appreciated. TIA!

 

window.onload = function() {
  test = document.getElementById('yui_3_17_2_1_1595252067143_172')
  console.log("Printing " + test);
  //alert(document.getElementById("yui_3_17_2_1_1595035499467_119"));
};

 

Link to post
  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

1 answer to this question

Recommended Posts

  • 0

I struggled with the same thing.  What I did was add the base code and event code under "Additional Info" in the product edit box.  If you add a code block and paste your base code and event code in that box, then when someone adds to cart the item, it should appear in the tag conversion.  Hope this helps! 

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...