How do I manually integrate web events in pixel code?

Hey,

I have a question about the manual integration of the meta pixel code in the html.

Yesterday I set up my first pixel via shopify integration. I noticed, that the pixel helper wasn’t tracking a pixel on my website, though it still send delayed signals to my event manager. So for testing reasons (immediate response), I decided to install a new pixel manually into my header section. The pageview tracking worked perfectly so I added other basic events like ‘purchase’, etc. to the ‘Web Event Configurations’.

But how are those events getting in the pixel code in my html? Because when I took a look at the code itself (with very limited coding knowledge), it only contained the ‘pageview’ event.

Do I have to add the code for those events also manually?

And in consequence, why does meta tell me to add events that don’t do anything unless I integrated the pixel via partner integration?

If you have very limited coding knowledge, it’s best you setup the channels in Shopify. See here https://help.shopify.com/en/manual/online-sales-channels/facebook-instagram-by-meta/setup. Doing that will get you going with the partner integration that you heard about from Meta. The partner integration makes it easier. You need coding knowledge to pass the right variables to your pixel at the right time under the right events. The integration will handle it for you 95% of the time.

Using GTM to add pixel code & events or adding it manually?

Hi @Jaywe ,

This is Richard from PageFly - Shopify Page Builder app.

When you follow the guide by Shopify about setting pixel https://help.shopify.com/en/manual/promoting-marketing/analyze-marketing/facebook-pixel but the pixel doesn’t work, I highly recommend you contact Shopify support to check and get your issue fixed.

On the other hand, when the pixel is working on your store, you can use the Facebook Event setup, you can enter your URL, and click Open website. The Event setup tool will launch in your website browser. After that, you can review each suggested event and then select Confirm or Dismiss. It will help you to configure and manage the pixel easier.

I hope those suggestions help!

Richard.

Hello @Jaywe ,

This is Gina from flareAI app.

When you manually integrate the meta pixel code in your HTML, you need to add the code for each event you want to track on your website. This is because the meta pixel code for each event contains unique parameters that need to be included in the code for that event to be tracked properly. So, if you want to track additional events like ‘purchase’, you will need to add the corresponding code for those events manually to your website’s HTML.

Regarding your second question, Meta provides event codes to customers irrespective of the integration method (partner integration or manual integration) because the event codes are universal and can be used with any integration method. However, partner integrations may automate the process of event tracking and make it easier for you to implement the event codes. When you manually integrate the code, you will need to ensure that the event codes are added correctly to your website’s HTML for them to be tracked.

Please don’t hesitate to reach out if you require any additional assistance.

Gina

Thank you for your response, @soleseriouss :slightly_smiling_face:

Sofar I only added the default base pixel code from meta itself. No GTM.

Hi @PageFly-Richard ,

thank you for your response.

I already contacted shopify about another issue that might be connected to this.

Is the pixel helper even supposed to detect a pixel instantly when you go via shopify integration?

Because integration doesn’t add a pixel code to your website. It just send very delayed information to the event manager like the conversion api.

Hello @flareAI ,

thank you for your response. It was very helpful.

In the second paragraph, you said ‘the event codes are universal and can be used with any integration method’. But the partner integration doesn’t add any event code to your website html right? The code is probably added on the shopify server/ domain automatically.

If I click on ‘Aggregated Event Measurement’ and then ‘configure web events’, it seems to do literally nothing for manual integration. Or does it print a new pixel code or code snippet somewhere that I can add to my code? It look like a template that is only made for automatic partner integration.

But maybe I am missing something big here…

Ok I take all of that back. I just now realized that the ‘Aggregated Event Measurement’ is a actually only for the pixel optimization on ios devices. I thought, that it sets up the browser pixel events…

That makes sense now.

Try adding it with GTM, it’s really easy and quick.

@Jaywe As far as I know if the pixel is properly connected to the store, the pixel helper can work, or you may try apps on the Shopify app store for that, it can cut some work and the app support may help you