Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified answer events to always fire irregardless of settlement status #306

Merged
merged 3 commits into from
Jun 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
All notable changes to this project will be documented in this file.
We follow the [Semantic Versioning 2.0.0](http://semver.org/) format.

## 2.3.6
- Modified Google Analytics question event to fire independent of settlement status

## 2.3.5
- Fixed Google Analytics events on "Yes" and "Not sure" buttons

Expand Down
6 changes: 4 additions & 2 deletions src/disclosures/js/views/question-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,9 @@ var questionView = {
} else if ( $( this ).attr( 'id' ) === 'question_answer-yes' ) {
questionView.$followupYes.show();
questionView.$followupNoNotSure.hide();
Analytics.sendEvent( getDataLayerOptions( 'Step Completed', 'Yes' ) );
} else {
questionView.$followupNoNotSure.show();
questionView.$followupYes.hide();
Analytics.sendEvent( getDataLayerOptions( 'Step Completed', 'Not sure' ) );
}
// Show the rest of the page
questionView.$getOptions.show();
Expand All @@ -95,6 +93,10 @@ var questionView = {
}, 900, 'swing', function() {
// Noop function.
} );

Analytics.sendEvent( getDataLayerOptions( 'Step Completed',
$( this ).text().trim() )
);
} );
}

Expand Down