Currently it's too hard read js for include onesignal and add custom overrides for onesignal scripts (like setExternalUserId, setEmail, setSMSNumber). This patch provide more clean js for include onesignal with ability add custom snippets.
Issue fork onesignal-3318255
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
cosolom commentedComment #4
geoanders commented@cosolom
Thanks for this! I do like the cleaner and easier to read code.
I think we will need to add some information around the JS injected piece and update README. Also, does OneSignal recommend this or was this something you needed in your use case?
Comment #5
geoanders commentedComment #8
geoanders commentedComment #10
cosolom commented@geoanders without this is too hard inject own external user id and other information. For example with that code I can do this in my own hook: