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

Handle shim data from GLEAN #74

Closed
wants to merge 2 commits into from
Closed

Handle shim data from GLEAN #74

wants to merge 2 commits into from

Conversation

relud
Copy link
Contributor

@relud relud commented Nov 10, 2022

@relud relud requested a review from a team as a code owner November 10, 2022 18:03
@@ -24,6 +24,10 @@ def handle_message(event, context):
for tile in telemetry["tiles"]:
if "shim" in tile:
ping_adzerk(tile['shim'])
elif "metrics" in telemetry:

Choose a reason for hiding this comment

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

The ping, as documented, is sent for both clicks and impressions. We should check ping_info.reason to see what this ping is about and bubble the information accordingly as needed.

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 don't know what is meant here by "bubble the information accordingly".

I suspect you mean for it to be added to the value passed to ping_adzerk. That function is being passed a checksummed string, so it's unclear to me how that would be done, or even what the string contains, and I assumed that pocket was formatting the value in the client with all necessary information.

Choose a reason for hiding this comment

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

I mean that this should be something like

Suggested change
elif "metrics" in telemetry:
elif ("ping_info" in telemetry") and ("metrics" in telemetry):
# reason is either a 'click' or an 'impression'.
reason = ping_info.reason

If adzerk is only expecting 'impressons', then we should not submit the SHIM in case this is a 'click' (user clicked on the ad).

Copy link
Contributor

Choose a reason for hiding this comment

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

@Dexterp37, Kevel (formerly AdZerk) are expecting shims for both clicks and impressions.

Choose a reason for hiding this comment

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

@nina-py does it mean that AdZerk doesn't care about the difference between clicks and impression and so we should not send additional information, or that we should send this particular bit of information in addition to the SHIM?

Copy link
Contributor

Choose a reason for hiding this comment

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

@Dexterp37, from what I know, the shim contains all the info Kevel needs, including whether it's an impression or a click, so we should be good there sending just the shim as we do from the desktop browser.

nina-py
nina-py previously approved these changes Nov 29, 2022
Copy link
Contributor

@nina-py nina-py left a comment

Choose a reason for hiding this comment

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

Looking good! Deployment for the telemetry function is manual, so it's something that I'll postpone doing until I can do so over Zoom pairing with someone from my team tomorrow.

@nina-py
Copy link
Contributor

nina-py commented Nov 29, 2022

@relud, could you please do an empty commit to trigger a CI check? As initially it wouldn't start because your patch is coming from a fork of this repository. We've updated settings now but need a commit to kickstart the CI check.

@relud
Copy link
Contributor Author

relud commented Nov 29, 2022

looks like still no response from CI

@nina-py
Copy link
Contributor

nina-py commented Nov 29, 2022

@relud, I wonder if you have permissions to create a branch on this repo directly and recreate this PR so that CircleCI would do the checks? Would this be too much to ask? 🙏

@relud
Copy link
Contributor Author

relud commented Nov 29, 2022

I don't have permission to do that, but just pushing my commit to a branch on this repo instead of the fork might do the trick (it does for other repos owned by DE). I also don't have permissions to do that, but these are the commands that would do it:

git clone https://github.com/Pocket/proxy-server
cd proxy-server
git remote add relud https://github.com/relud/proxy-server
git fetch relud
# this is the part that i don't have permission to do
git push origin refs/remotes/relud/patch-1:refs/heads/relud-patch-1

@nina-py
Copy link
Contributor

nina-py commented Nov 29, 2022

@relud, I just did that following your instructions, looks like you can create a new PR now? https://github.com/Pocket/proxy-server/compare/relud-patch-1?expand=1

@nina-py
Copy link
Contributor

nina-py commented Nov 29, 2022

Meanwhile, CircleCI continues being weird - it did run a check on this branch but failed installing things 😵‍💫

@relud
Copy link
Contributor Author

relud commented Nov 29, 2022

new PR created: #75

@cmharlow
Copy link
Contributor

cmharlow commented Dec 1, 2022

Ah thanks @relud ! and apologies - made the new PRs to show alternatives with your changes then was going to rebase to not make your experience merging this one so bumpy, but alas, i made things bumpy haha

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.

4 participants