Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Facebook Pixel] - Invalid PixelID: null. #6

Open
freedbrd opened this issue May 27, 2021 · 3 comments
Open

[Facebook Pixel] - Invalid PixelID: null. #6

freedbrd opened this issue May 27, 2021 · 3 comments
Assignees

Comments

@freedbrd
Copy link

Hi!

When try to use this one and import PixelModule like this

PixelModule.forRoot({ enabled: false, pixelId: 'pixelID', }),

I got the next warning

image

and code from the header section:

image

@freedbrd
Copy link
Author

freedbrd commented May 27, 2021

"ngx-pixel": "^1.0.2"

@angular-devkit/architect 0.901.12
@angular-devkit/build-angular 0.901.12
@angular-devkit/build-optimizer 0.901.12
@angular-devkit/build-webpack 0.901.12
@angular-devkit/core 9.1.12
@angular-devkit/schematics 9.1.12
@angular/cdk 9.2.4
@angular/material 9.2.4
@ngtools/webpack 9.1.12
@schematics/angular 9.1.12
@schematics/update 0.901.12
rxjs 6.5.5
typescript 3.8.3
webpack 4.42.0

@NielsCodes NielsCodes self-assigned this May 27, 2021
@NielsCodes NielsCodes added bug Something isn't working and removed bug Something isn't working labels May 27, 2021
@NielsCodes
Copy link
Owner

@freedbrd I see you import the module with { enabled: false }. Where do you call initialize()?

@freedbrd
Copy link
Author

freedbrd commented May 27, 2021

@NielsKersic Hi! Sorry, a misprint.

The issue with { enabled: true }.

When I use the following code:

PixelModule.forRoot({ enabled: true, pixelId: '123456789123456', }),

I get the described warning: [Facebook Pixel] - Invalid PixelID: null

and also there is fbq('init', 'undefined'); in the header section (check the screenshot).

If I use { enabled: false } and initialize the pixel by initialize('pixelID') it works fine but in case if I want to initialize pixel immediately I get the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants