I am trying to use the comment_post action to pass data for this action to Intercom which I am using to track users’ behaviour/interaction.
The function seems to be working fine aside from the JS part of the function as Intercom is not received anything.
I have also assumed that the other required tags are not firing on this hook so I tried to include them too like so but it still didn’t work.
wp_enqueue_script( 'intercom-widget', plugin_dir_url(__FILE__) . 'intercom-widget.js', array('jquery') ); wp_enqueue_script( 'intercom-tag-user', plugin_dir_url(__FILE__) . 'intercom-tag-user.js', array('jquery') );
I have been at this since yesterday and I can’t figure out why my code is not working. Hopefully a more established developer would help me understand the issue.
Read more here: Intercom Event on WordPress Comment Post