# Capturing woocommerce shopping cart data

**URL:** <https://community.hubspot.com/t/capturing-woocommerce-shopping-cart-data/38327>\
**Category:** APIs & Integrations\
**Tags:** events\
**Created:** [June 3, 2021, 8:33am UTC](https://community.hubspot.com/t/capturing-woocommerce-shopping-cart-data/38327 "2021-06-03T08:33:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![OTomer](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/otomer/32/98942_2.png) [@OTomer](https://community.hubspot.com/u/OTomer)\
**Post date:** [June 3, 2021, 8:33am UTC](https://community.hubspot.com/t/capturing-woocommerce-shopping-cart-data/38327/1 "2021-06-03T08:33:10Z")

</div>

Hello,  
I manage a woocommerce shop with integration by API to Hubspot.  
the issue I am having is that the API only collectes data when a user clicks on Place an order - which is tooo far on the sales cycle.  
this is our proccess:  
1. user chooses a product and places it in the cart - I would want to collect this data for - our customer support to know what the user is interested in, for automations, statistics and more.  
2. the user moves to the checkout page - also nothing is being collected in a way I can use this data later - this is a stage that not may customer reach and is most important.  
3. only after filling all billing and payment data and clicking the place an order a deal or an abundont cart is being created.  
for E-commerce sites - this is far too little to late for a CRM.  
I understand that only a custome made API will be able to help me here? or do you have maybe any other solution?  
Thanks  
O  
Images for the 3 stages on the store:

 ![OTomer_6-1622709135888.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/c/0/c094a9239a8fc95d35e58e0da6047ba74bbfab40.png)

 ![OTomer_5-1622709087630.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/f/1/f1ce717e79a79e896d37f4dd7856918aa2599e6b.png)

 ![OTomer_4-1622709026929.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/c/c17a0b4fde8c8988784737584ac84281880e9e05.png)

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [June 3, 2021, 5:02pm UTC](https://community.hubspot.com/t/capturing-woocommerce-shopping-cart-data/38327/2 "2021-06-03T17:02:51Z")

</div>

@himanshurauthan , any help you can offer here?

---

<div class="post-metadata">

**Author:** ![himanshurauthan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/himanshurauthan/32/53076_2.png) [@himanshurauthan](https://community.hubspot.com/u/himanshurauthan)\
**Post date:** [June 4, 2021, 3:36pm UTC](https://community.hubspot.com/t/capturing-woocommerce-shopping-cart-data/38327/3 "2021-06-04T15:36:47Z")

</div>

Hello @dennisedson, thank you for counting me in. 🙂

Hey @OTomer,

You can use cookies to fetch the information related to the shopping cart if the user is a registered user. You will get their email by **$\_COOKIE[‘hubspotutk’]** here HubSpot stores the user’s email, and then you can send data from cookies to HubSpot.

But if the user is a guest user then what you can do is you can use a pop-up that will store the user’s email address and then with the help of that pop-up’s data you will get the email address of guest users as well then you can use **API ‘’/contacts/v1/contact/utk/’ . $hutk . ‘/profile?hapikey=’ . $apiKey’** , to send info to HubSpot.

I hope that helps.

Regards,
