mg2connext / connext

6 stars 0 forks source link

Custom "Call to Action" Connext Event #14

Closed sframe closed 7 years ago

sframe commented 7 years ago

Hi @mg2dael et al. :)

We have a ticket in progress to track clicks on "call to action" buttons (i.e. the main button in each connext HTML template that we'd like the visitor to press) and I think we'll need some assistance from your team.

There are events that are fired when someone clicks the "x" button or clicks outside the modal to cancel; but we don't have an event on the actual button; nor do we have any identifiers we can tie metrics to a click event.

  1. We’d like to have a standardized custom event fired to wire into our metrics for any main “call to action button” in a Connext HTML template. (@willist suggested: onActionComplete)
  2. If we can’t do that then we’d like to enforce a convention of assigning a standard “ID” or “class” to the call-to-action buttons so we can wire those click events to metrics.

Please let me know if this request makes sense or if you'd like more details :)

screen shot 2017-01-11 at 7 47 26 pm
mg2dael commented 7 years ago

Hi Shawn, The request absolutely makes sense. I agree that the better solution is to fire an event upon completion. I've got to bounce back to the team and brainstorm, though. We have templates with more than one button (I know you don't use them, but they exist) so we'll have to sort out a way to distinguish which button when more than one was clicked. Does this block our ability to go live with the first pilot campaigns?

sframe commented 7 years ago

Hi @mg2dael,

Good question, I'll have to ask Gwen. I'll email her now.

mg2dael commented 7 years ago

Conversation has moved its way to e-mail in order to include Gwen.

willist commented 7 years ago

@mg2dael I'm not sure if I'm still on the email chain. Could you post an update here?

mg2dael commented 7 years ago

@willist Sorry about that!

We added onButtonClick. It's fired every time a user clicks on any element that has an attribute 'data-mg2-action=click'. By default all buttons on ConneXt's templates have this attribute.

I asked the developers to add the attribute to conversations you guys are already using (since it'll only get added to new ones by default). As I went to type this I realize I never got confermation that they actually did and that the only one I know about is your "Member Center's Super Awesome Test Test" so I think I should revisit that part.

willist commented 7 years ago

I am able to see 'data-mg2-action=click' as an element attribute, but I am not seeing onButtonClick fire. Has this been deployed to the test environment, and is there anything I need to do to see onButtonClick fire?

mg2dael commented 7 years ago

It should be in test, so I'm not sure why you're not seeing it. To help me be clear when I report, is it that you're not seeing it in the browser, your tracking software, or both?

willist commented 7 years ago

I'm not seeing it in the browser.

If you visit, http://membercenter-dev-metrics.aws.cmgdigital.com/newsletters and inspect the Subscribe button, it has data-mg2-action="click". With debug enabled, I see Connext >>>> DEBUG <<<<< Fire Default ... for all other events, but when the button is clicked, there is no indication of a corresponding onButtonClick.

mg2dael commented 7 years ago

I see. It took me forever to remember the bookmarklet you guys created, but now that I'm using it I'm having the same problem. I'll bounce it off the devs. I had asked them to put it in v1.0 as well as 1.1, but I'm guessing that's what was missed.

mg2dael commented 7 years ago

@willist It wasn't put into your version of the plug in. It should be there now. I haven't had a chance to verify myself yet, but I wanted to let you know.

willist commented 7 years ago

@mg2dael Thank you for the update. I tried to verify, but still wasn't able to see onButtonClick.

mg2dael commented 7 years ago

@willist I'll pass it on. Can you send me the link you guys are referencing to instantiate connext so that I can reiterate exactly where they need to add it?

mg2dael commented 7 years ago

@willist my developers are seeing it fired: http://prnt.sc/e6hdi7 Do you want me to set up a call so you can review with them?

willist commented 7 years ago

@mg2dael Looks like it's firing this morning. Thank you for all your help on this issue!