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

✨ New feature: Adding our platform MoEngage as an amp-analytics plugin. #27222

Merged
merged 4 commits into from
Apr 21, 2020

Conversation

nawazMoEngage
Copy link
Contributor

@amp-owners-bot amp-owners-bot bot requested a review from zhouyx March 13, 2020 12:13
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@@ -0,0 +1,59 @@
/**
* Copyright 2019 The AMP HTML Authors. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: 2020

@micajuine-ho
Copy link
Contributor

Hi @nawazMoEngage, thanks for your integration. Just a few nits before we can merge. Thanks!

Comment on lines 265 to 267
"addDevice": "https://websdk.moengage.com/v2/device/add?os=_os_&app_id=!appId&sdk_ver=_sdk_ver_&app_ver=_app_ver_&device_tz_offset=_device_tz_offset_&device_tz=_device_tz_&os_platform=_os_platform_&unique_id=_unique_id_&isAmp=true",
"event": "https://websdk.moengage.com/v2/report/add?os=_os_&app_id=!appId&sdk_ver=_sdk_ver_&app_ver=_app_ver_&device_tz_offset=_device_tz_offset_&device_tz=_device_tz_&os_platform=_os_platform_&unique_id=_unique_id_"
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@micajuine-ho why it is resolving to the url params? Since I am using useBody and xhrpost, extraUrlParams should go in the request body.
If that is not the case, then how can I have objects in extraUrlParams?

Copy link
Contributor

Choose a reason for hiding this comment

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

It will go in the request body in the actual request. What's happening here is that our testing framework doesn't account for this scenario right now, and so it always appends the extraUrlParams

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for clarifying. What will you suggest me to do now? we are not in the situation to have this API rewritten from the backend.

Copy link
Contributor

Choose a reason for hiding this comment

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

I can fix the testing setup to account for this situation correctly, and then we can retest to make sure that it aligns with your backend endpoints.

How does that sound?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sounds great. Thanks a lot..
Hope it will not take much time. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@micajuine-ho Hi Micajuine, any update on this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi, no updates as of yet. We've had other items of high priority to attend to recently. I will try to carve some time out this week to finish this. Thanks for the reminder.

@nawazMoEngage
Copy link
Contributor Author

@googlebot I signed it!

@nawazMoEngage
Copy link
Contributor Author

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.

What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@micajuine-ho
Copy link
Contributor

Hi @nawazMoEngage thank you for your patience. I created a PR (#27792) that outlines possible solutions. I will update you as that PR progresses.

@micajuine-ho
Copy link
Contributor

@nawazMoEngage
Copy link
Contributor Author

@nawazMoEngage I think you should just fix your requests right now to satisfy the current tests (there's a chance that we don't end up fixing the tests because other vendors are currently working around it as well). If we do end up changing the tests, I can update the requests.

You would need to change the requests in vendor-requests.json to this:

OK done..

@zhouyx
Copy link
Contributor

zhouyx commented May 12, 2020

Can we please remove moengage.js from the code base. It's no longer required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants