Skip to content
Permalink
Browse files

Update ga

  • Loading branch information
marcomontalbano committed Jan 9, 2020
1 parent f200b81 commit 5785b9f024913d008935aa681beef89e9b3d687f
Showing with 6 additions and 5 deletions.
  1. +6 −5 src/index.js
@@ -121,11 +121,6 @@ let memoFormSubmit;
document.querySelector('form').addEventListener('submit', function (e) {
e.preventDefault();

ga('send', 'event', {
eventCategory: 'V2M',
eventAction: 'convert'
});

NProgress.start();

const formElement = e.currentTarget;
@@ -135,6 +130,12 @@ document.querySelector('form').addEventListener('submit', function (e) {
const showPlayIcon = formElement.querySelector('[name="show-play-icon"]').checked;
const newMemoFormSubmit = `${videoUrl}|${showPlayIcon}`;

ga('send', 'event', {
eventCategory: 'V2M',
eventAction: 'convert',
eventLabel: videoUrl
});

if (memoFormSubmit === newMemoFormSubmit) {
updateMarkdown(title);
NProgress.done();

0 comments on commit 5785b9f

Please sign in to comment.
You can’t perform that action at this time.