I’m trying to figure out how to track when someone completes an achievement/badge on my wordpress site using the BadgeOs plugin.
My questions.
-
Where does the event tracking code go on the page? In the header? In the body?
-
I don’t know what to put for the YOUR_EVENT or ANY_DATA values in the event tracking script.
I asked about it on the support page of BadgeOS and they said:
I think your best bet is going to be the following action hook in BadgeOS:
do_action( ‘badgeos_award_achievement’, $user_id, $achievement_id, $this_trigger, $site_id, $args );
It fires whenever an achievement gets awarded, and you’ll have access to the user ID who got awarded, the achievement ID, which is going to be a post ID, since achievements are post type posts, as well as the trigger, site ID, and some other arguments.
With that, you should be able to work out something to do with the Active Campaign logging or emailing
But I’m not sure which of those variables to put in. Any ideas? Any help would be greatly appreciated.
Is this something I could figure out myself or will I need to hire someone?