Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Shipping Line object in checkout_shipping_info_submitted standard event

Shipping Line object in checkout_shipping_info_submitted standard event

amrit123
Shopify Partner
4 0 2

I am writing a custom web pixel for google tag manager in Checkout Extensions Web Pixel. There is a standard event called "checkout_shipping_info_submitted" which has shippingLine data (which can be accessed by event.data.checkout.shippingLine) from which I need to push the title of the shipping rate in event. However in description of this shippingLine object, it is saying that it will be transitioned to shipping_line object once user selects a shipping rate. But when testing in store, it is remaining the same and only price of the shipping rate selected by the user is accessible. How do I get the title of the shipping rate?

Replies 3 (3)

Stonanni
Shopify Partner
7 1 3

Unfortunately seems not to exists this information at this time.
Quite embarassing thinking that we have only 5 months left to the switchoff of the checkout.liquid customization

amrit123
Shopify Partner
4 0 2

I solved it, you can get shipping title by -> event.data.checkout?.delivery?.selectedDeliveryOptions[0]?.title

Stonanni
Shopify Partner
7 1 3

https://changelog.shopify.com/posts/more-data-fields-available-in-web-pixels

 

It has been released at the beginning of the summer