/tagmanager/community?hl=en
/tagmanager/community?hl=en
5/12/16
Original Poster
Santi Cu

Facebook Pixel error: duplicate pixel ID

Hey there people! Great if I could get a hand on this. 
I have set up the new Facebook Pixel through GTM, and in order to add "Facebook conversion tracking" I created a new Tag with a Tag Sequencing so that both tags stay together and one fire after the other. 
This new tag only have the Facebook Event Code.
I make the tag fire in the signup. 
Everything seems fine, but on the console I have this error that says: "Facebook pixel error: duplicate pixel ID".
Does anyone have the same problem? any ideas on how to fix it?

Thanks in advance!
Community content may not be verified or up-to-date. Learn more.
All Replies (6)
Google user
6/28/16
Google user
Hi Santi,
I think its because everytime you send a event the code is initialized with the same pixel id. Actually initialization should happen only once. My fix to this is below - 

if(typeof fbq === 'undefined') {
    !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
    n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
    n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
    t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,

    fbq('init', '123123123213121');
    fbq('track', 'PageView');
    fbq('track', '{{fBPixelType}}');
  }else {
    fbq('track', '{{fBPixelType}}');
  }
Google user
8/24/17
Google user
Hi Santi, 

late answer, but maybe another approach for this problem. You have to check whether your Facebook Pixel code is only initialised once per page (and not per event). Go to the tag where your FB Pixel code is and open the advanced settings. Tag firing options -> Once per page (not event!).

This worked for me.

Best, Klaus-M.
Kate Ryan-Taylor
6/29/18
Kate Ryan-Taylor
Whereabouts would I put this code in the website?
Part of the CSS?

dipankar das
8/4/18
dipankar das
Could you please tell me where to put the code.
Артём Саркисов
9/28/18
Артём Саркисов
i think you should put it in a body of FB pixel
gabrielgranado
3/14/19
gabrielgranado
Changing tag firing options to "once per page" did it for me too. Thank you.
Were these replies helpful?
How can we improve them?
 
This question is locked and replying has been disabled. Still have questions? Ask the Help Community.

Badges

Some community members might have badges that indicate their identity or level of participation in a community.

 
Google Employee — Google product team members and community managers
 
Community Specialist — Google partners who help ensure the quality of community content
 
Platinum Product Expert — Community members with advanced product knowledge who help other Google users and Product Experts
 
Gold Product Expert — Community members with in-depth product knowledge who help other Google users by answering questions
 
Silver Product Expert — Community members with intermediate product knowledge who help other Google users by answering questions
 
Product Expert Alumni — Former Product Experts who are no longer members of the program
Community content may not be verified or up-to-date. Learn more.

Levels

Member levels indicate a user's level of participation in a forum. The greater the participation, the higher the level. Everyone starts at level 1 and can rise to level 10. These activities can increase your level in a forum:

  • Post an answer.
  • Having your answer selected as the best answer.
  • Having your post rated as helpful.
  • Vote up a post.
  • Correctly mark a topic or post as abuse.

Having a post marked and removed as abuse will slow a user's advance in levels.

View profile in forum?

To view this member's profile, you need to leave the current Help page.

Report abuse in forum?

This comment originated in the Google Product Forum. To report abuse, you need to leave the current Help page.

Reply in forum?

This comment originated in the Google Product Forum. To reply, you need to leave the current Help page.

false
Search
Clear search
Close search
Google apps
Main menu
Search Help Center
true
102259
false