Facebook Pixel script is not being written to Facebook Pixel Widget NOP Commerce Version 4.40.4

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Il y a 2 ans
Hi,

I believe we have successfully enabled and configured the Facebook Widget for our site though the facebook pixel code is not showing up on our website. We recently upgraded to version 4.40.4.

From the Facebook end this pixel should work since it was working on our site when we were using NOP Commerce 4.20.

Is this a known bug for 4.40?
Il y a 2 ans
Nope, there are no bugs with this plugin. It works correctly on a clean installation, the script is successfully generated on all configured pages.
Check your plugin configuration, system logs for errors, browser console for client errors.
Il y a 2 ans
This is the error I am getting:

Error
Short message  
Widgets.FacebookPixel error:
Value cannot be null. (Parameter 'value')
Full message  
System.ArgumentNullException: Value cannot be null. (Parameter 'value')
   at System.Text.Encodings.Web.TextEncoder.Encode(String value)
   at Nop.Plugin.Widgets.FacebookPixel.Services.FacebookPixelService.PrepareUserPropertiesScriptAsync(IList`1 configurations)
   at Nop.Plugin.Widgets.FacebookPixel.Services.FacebookPixelService.PrepareScriptsAsync(IList`1 configurations)
   at Nop.Plugin.Widgets.FacebookPixel.Services.FacebookPixelService.<PrepareScriptAsync>b__33_0()
   at Nop.Plugin.Widgets.FacebookPixel.Services.FacebookPixelService.HandleFunctionAsync[TResult](Func`1 function)
Il y a 2 ans
It looks like this is really a bug.
To be sure, try disabling "Include User properties" setting in the plugin configuration and see whether the script is generated.
Il y a 2 ans
We found the reason for the error, try using this commit to apply the fix.

[email protected] wrote:
This is the error I am getting:

Error
Short message  
Widgets.FacebookPixel error:
Value cannot be null. (Parameter 'value')
Full message  
System.ArgumentNullException: Value cannot be null. (Parameter 'value')
   at System.Text.Encodings.Web.TextEncoder.Encode(String value)
   at Nop.Plugin.Widgets.FacebookPixel.Services.FacebookPixelService.PrepareUserPropertiesScriptAsync(IList`1 configurations)
   at Nop.Plugin.Widgets.FacebookPixel.Services.FacebookPixelService.PrepareScriptsAsync(IList`1 configurations)
   at Nop.Plugin.Widgets.FacebookPixel.Services.FacebookPixelService.<PrepareScriptAsync>b__33_0()
   at Nop.Plugin.Widgets.FacebookPixel.Services.FacebookPixelService.HandleFunctionAsync[TResult](Func`1 function)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.