Integrate shopify webpixels with existing server

Solved

Integrate shopify webpixels with existing server

kkang
Shopify Partner
7 1 2

I already have an shopify app running services for clients. I want to add webpixels tracking support to the app. The current webpixels demo app requires a Javascript server running all time to keep the pixels sending from shopify shops.

 

I configured the pixels to be send to an public accessible endpoint different from the localhost server. It is working until I stopped the localhost javascript demo server. If I stopped the localhost demo server, the webpixels will stop sending to the event handlers after few minutes. Is there any reason for this? Is the shop checking if the demo server is running before sending the pixels? May I know how that is done?

 

I current app is in PHP. I can not have existing app changed to Javascript. So the demo app with fake 'trycloudflare.com' configurations are not directly adoptable.

 

What do I need to add to my existing app to so the shops with this app will know the app is running and keep on sending the registered webpixels? Do I need to add that /ping endpoint?

 

 

 

 

Accepted Solution (1)

kkang
Shopify Partner
7 1 2

This is an accepted solution.

No worries. I got this to work. Basically, if I have an existing Shopify app for the admin api with full authentication flow working, I can register the Webpixels (via the Shopify CLI) for the app, deploy it (via the Shopify CLI) and enable it (via the partner portal), then the pixels will send. It will not require running the demo server (npm run dev).

 

My app is using PHP Laravel.

 

 

View solution in original post

Reply 1 (1)

kkang
Shopify Partner
7 1 2

This is an accepted solution.

No worries. I got this to work. Basically, if I have an existing Shopify app for the admin api with full authentication flow working, I can register the Webpixels (via the Shopify CLI) for the app, deploy it (via the Shopify CLI) and enable it (via the partner portal), then the pixels will send. It will not require running the demo server (npm run dev).

 

My app is using PHP Laravel.