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

WOC: Implement utm* params of a login UserAction stored in the DB feature #2212 #2359

Closed
wants to merge 3 commits into from

Conversation

unclebean
Copy link
Contributor

Description

This PR is for saving utm* params to DB for data analysis, relevant story is 2212.
Whenever user access gitcoin with "utm_medum, utm_source, utm_campaign" will store them in cookie, after user login or user logout will store to dashboard_useraction table.

Checklist
  • linter status: 100% pass
  • changes don't break existing behavior
  • commit message follows commit guidelines
Affected core subsystem(s)

UserAction data model.

Testing

Test with below 3 scenarios.

Scenario: Record utm* in Cookie
Give: utm_medum, utm_source, utm_campaign in URL
When: User open gitcoin
Then: Should record utm* in Cookie

Scenario: Record utm* in DB
Give: utm* in Cookie
When: User click "LOG IN" button
Then: Should record utm* in DB

Scenario: Record utm* in DB
Give: utm* in Cookie
When: User click "Log Out" button
Then: Should record utm* in DB

Refers/Fixes

@codecov
Copy link

codecov bot commented Oct 5, 2018

Codecov Report

Merging #2359 into master will decrease coverage by 0.79%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #2359     +/-   ##
=========================================
- Coverage   29.47%   28.68%   -0.8%     
=========================================
  Files         146      145      -1     
  Lines       11777    11760     -17     
  Branches     1599     1598      -1     
=========================================
- Hits         3471     3373     -98     
- Misses       8188     8266     +78     
- Partials      118      121      +3
Impacted Files Coverage Δ
app/dashboard/utils.py 30.65% <100%> (-4.37%) ⬇️
app/dashboard/models.py 49.88% <100%> (-2.91%) ⬇️
app/dashboard/embed.py 8.04% <0%> (-23.57%) ⬇️
app/bounty_requests/views.py 32.43% <0%> (-6.28%) ⬇️
app/git/utils.py 42.17% <0%> (-0.54%) ⬇️
app/bounty_requests/models.py 95.23% <0%> (-0.22%) ⬇️
app/retail/emails.py 20.12% <0%> (ø) ⬆️
app/avatar/utils.py 18.28% <0%> (ø) ⬆️
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 28b6223...c28b9f3. Read the comment docs.

@thelostone-mc thelostone-mc requested review from mbeacom and thelostone-mc and removed request for mbeacom October 8, 2018 05:24
Copy link
Member

@thelostone-mc thelostone-mc left a comment

Choose a reason for hiding this comment

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

code lgtm @unclebean ^_^
could you resolve the conflicts ?

@thelostone-mc thelostone-mc added the enhancement This is a feature to be enhanced or improved. label Oct 8, 2018
@unclebean unclebean closed this Oct 8, 2018
owocki added a commit that referenced this pull request Nov 8, 2018
WOC: Implement utm* params of a login UserAction stored in the DB feature #2212 #2359
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is a feature to be enhanced or improved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants