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

[MC-2363] Add parsing of url params on open-url action #386

Merged
merged 5 commits into from
Nov 26, 2024

Conversation

nishant-clevertap
Copy link
Contributor

@nishant-clevertap nishant-clevertap commented Nov 15, 2024

  • Added parsing of urls on open-url action.
  • This will track the parameters in url for in-app in Notification Clicked event.
  • This will also parse __dl__ if wzrk_c2a is present in query parameters or action URL.
  • Fixes an issue where wzrk_c2a value is passed as null to backend when we receive null for callToAction value in webView message handler. Example:
var message = { action:'triggerInAppAction', actionJson: actionJson, callToAction: null, buttonId: null };
window.webkit.messageHandlers.clevertap.postMessage(message);

For above script we get message as below where value for callToAction is of NSNull class:

{
    ...
    buttonId = "<null>";
    callToAction = "<null>";
}

@nishant-clevertap nishant-clevertap self-assigned this Nov 15, 2024
Copy link
Contributor

@nzagorchev nzagorchev left a comment

Choose a reason for hiding this comment

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

My understanding is that we want to apply the parsing of the URL params for all in-app templates. The current changes apply only to HTML templates that use the JS Interface triggerInAppAction.

The code added is a duplicate of the code in CTInAppHTMLViewController. Please, reuse the code, check if it is better to move it to handleNotificationAction and/or the utils.

@nzagorchev nzagorchev merged commit 1e6c80d into develop Nov 26, 2024
1 of 2 checks passed
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