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

#759 google ecommerce #760

Merged
merged 7 commits into from Mar 7, 2019
Merged

#759 google ecommerce #760

merged 7 commits into from Mar 7, 2019

Conversation

ArtemijRodionov
Copy link
Contributor

Closes #759

@ArtemijRodionov ArtemijRodionov self-assigned this Mar 6, 2019
Copy link
Contributor

@duker33 duker33 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minors: naming, api data types, tests proposition

@@ -78,6 +67,44 @@
});
}

// @todo #759:30m Move PublishedGATracker to a separate file.

class PublishedGATracker {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

provide doc plz why it's published, but not common GATracker

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

publish is not the most good name for classes purpose. LimitedGATracher or SafeGATracker might be more good. Up to you

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe LoadedGATracker would be the best name

ga('require', 'ecommerce'); // Ignore ESLintBear (block-scoped-var)
const tracker = new GATracker(ga, 'ecommerce'); // Ignore ESLintBear (block-scoped-var)

tracker.purchase(productsData, txData);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hope data is consistent with gAnalytics api docs. Looks too simple and suspicious =)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Data were consistent before, so what could be wrong?

this.published = false;
}

purchase(productsData, txData) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe it's possible to add tests for ecommerce behaviour.
We are already testing Ya.Metrika at SE: shopelectro.tests.tests_selenium.YandexMetrika

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will create todo for it

@ArtemijRodionov ArtemijRodionov merged commit 987327e into master Mar 7, 2019
@ArtemijRodionov ArtemijRodionov deleted the 759-google-ecommerce branch March 7, 2019 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants