Using Google Tag Manager as an Alternative for Facebook Pixel

With Facebook Pixel integration, you can track, analyse, and assess the effectiveness of your survey campaigns. However, there are certain events that you might not be able to track using FB Pixel, like survey starting and ending events, survey interactions, answer skipped, and more.

To solve this problem and help you track everything about your survey campaign, we suggest Google Tag Manager as an alternative.

With GTM (Google Tag Manager), you can uncover a wide range of user interactions like form submissions, click events, scroll events, page visits, survey starting and ending events, etc. This data can be then pushed to various analytics tools like Google Analytics, Facebook pixel, and more.

Let’s see how this alternative works.

  1. From your survey dashboard, select the survey which you have already integrated with Facebook Pixel. Disable the toggle first.



2. Before proceeding to the next step, create a Google Tag Manager account if you don’t have one. Create a container and copy the Container ID.

3. Now, enable the Google Tag Manager toggle in the same survey where you've disabled the Facebook Pixel toggle and paste your GTM Container ID.



4. After the successful authentication, go to your Google Tag Manager account dashboard and navigate to Tags below Overview.



5. Create a new Tag by clicking the New button at the right corner.



6. Name the Tag and configure the Tag Settings. Click on the Pencil icon to initiate the process.



7. Under the Tag type, select Custom HTML.



8. Now, copy the below code snippet. You can find this code snippet under Base code on Facebook for Developers page.


  • Your pixel id should be entered here.

  • The event for which you want to create a trigger for should be passed here. (In our case, it's 'PageView'

9. Paste the updated code in the Custom HTML area of your Google Tag Manager account.



10. Once done, create new Triggers or Custom Triggers for the events of your requirements. In our example, we have created Triggers for two custom events - SurveySparrowSurveyStart, SurveySparrowSurveyComplete. Whenever these custom events occurs from a user's side, the user will be calculated under the Page View count.




Here're the customer triggers that you can pass.

  • SurveySparrowSurveyStart: This trigger will be initiated when the user starts the survey.

  • SurveySparrowSurveyComplete: This trigger will be initiated when the user completes the survey

  • SurveySparrowSurveyAnswerSkipped: This trigger will be initiated when the user skipped a survey question or didn't answer any particular question of the survey.

  • SurveySparrowSurveyInteraction: This trigger will be initiated when the user answers or interacted with a survey question.

11. That’s it! When your survey is shared and the respondents start responding to the survey or complete the survey, you will be able to track and analyse the page views directly on your Facebook Pixel account in real-time.



Things to Remember

  1. Don't forget to disable the Facebook Pixel integration when integrating your survey with Google Tag Manager.

  2. You will need to copy the code snippet from the Facebook Developers page and customise it according to your requirements. Pasting the code as such in the custom HTML area might not work.

  3. In case you're stuck, this article should help you out- Google Tag Manager Integration with SurveySparrow.

Hope you found this article helpful.

Please feel free to reach out to us for any technical queries. We're just a chat away.

See you in the next one.

Did this answer your question?