Closed piotrknapik closed 4 months ago
Hi, I apologize for the delayed response.
Actually, to address the issue with the non-integer user_id, I'll be releasing a new version. In this version, you'll be able to add the tag using the new Laravel component syntax, allowing everyone to customize it according to their requirements.
Additionally, it will handle the enabling or disabling of advanced matching.
What happened?
The package doesn't support non-numeric user_ids like UUIDs. It cause a JS error: 'Uncaught SyntaxError: Invalid or unexpected token' because:
external_id: 0b8afcd1-47...
BTW: By default laravel-facebook-picture sends the Advanced Matching data (email and Laravel's user_id) by default for logged in users. Many privacy policies doesn't support that. I think the documentation should be update on how to disable it. I'll propose a PR with the new config variable within minutes.
I tried publishing the views and modyfing resources/views/vendor/head.blade.php file:
php artisan vendor:publish --provider="Combindma\FacebookPixel\FacebookPixelServiceProvider" --tag="views"
...but despite clearing caches this didn't work for me. Maybe because views are set up on packageBooted() instead of boot() in FacebookPixelServiceProvider? Not sure - I decided to propose a PR frm my fork instead ;P
How to reproduce the bug
Set user_id to a string and try running the package. You'll get the JS error.
Package Version
4.0.2
PHP Version
8.1.0
Laravel Version
10.43.0
Which operating systems does with happen with?
No response
Notes
No response