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

Add Adobe standard 2.0 info in the Consent doc #420

Merged
merged 8 commits into from
Oct 5, 2023

Conversation

cacheung
Copy link
Contributor

@cacheung cacheung commented Oct 3, 2023

Add Adobe uses standard 2.0 and metadata time info in the Consent doc.

Description

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Add Adobe uses standard 2.0 and metadata time info in the Consent doc.
@@ -65,4 +65,27 @@ iOS

<Tabs query="platform=ios&api=update-consents"/>

<InlineAlert variant="info" slots="text"/>

The updateConsents API automatically includes the following properties in its request to Edge Network: `standard` with the value `Adobe` and `version` with the value `2.0`. Additionally, the property `metadata` is set to the time at which the API is called.
Copy link
Contributor

Choose a reason for hiding this comment

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

The Consent extension uses Adobe Standard 2.0 when communicating with the Edge Network, when the updateConsents API is called. Additionally, ...


The updateConsents API automatically includes the following properties in its request to Edge Network: `standard` with the value `Adobe` and `version` with the value `2.0`. Additionally, the property `metadata` is set to the time at which the API is called.

In the following, you can see an example in a request that set collect consent to `y`:
Copy link
Contributor

Choose a reason for hiding this comment

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

I am hoping readers will not get confused with this payload and send the entire body. How about we also give an API call example, followed by the request payload, e.g.

Here is an example where updateConsents is called to set collect consent to y and bellow you can see the snippet of the request payload sent to the Edge Network.

"version": "2.0",
"value": {
"metadata": {
"time": "xxxx-xx-xxxxx:xx:xx.xxxx"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: you can use a sample date here

Update Adobe Standard 2.0 info example
Copy link
Contributor

@calebk1 calebk1 left a comment

Choose a reason for hiding this comment

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

Commentsssssssss

Comment on lines 72 to 101
Here is an example where updateConsents is called to set collect consent to y and bellow you can see the snippet of the request payload sent to the Edge Network.

**Set and update Consent**

```swift
// Example in iOS (Swift), updating users collect consent to 'yes'
let collectConsent = ["collect": ["val": "y"]]
let currentConsents = ["consents": collectConsent]
Consent.update(with: currentConsents)
```

**Request payload sent to the Edge Network**

```json
"consent": [
{
"standard": "Adobe",
"version": "2.0",
"value": {
"metadata": {
"time" : "2023-10-03T17:23:04.443Z"
},
"collect": {
"val": "y"
}
}
}
]
```

Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason we're not putting this within the tab?

Copy link
Contributor Author

@cacheung cacheung Oct 4, 2023

Choose a reason for hiding this comment

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

@calebk1 Thanks for providing me the updated InlineAlert script. Now we are able to group several texts and snippets together.
updateAlert

Is there any naming reference we need to follow for slots? I have
slots="text1, text2, text3, text4, text5"

Copy link
Contributor

Choose a reason for hiding this comment

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

For the naming reference, the only rule that applies is that the text parts must start with text. So what you've done with text1, text2, text3, etc... is fine.

Copy link
Contributor

Choose a reason for hiding this comment

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

@calebk1 can we also document this use-case in the repo's readme?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yup! Actually, this PR is the one that adds this capability (since I had to re-shadow the InlineAlert component), so once this is merged in, I'll make a PR that updates the info so it's more documented.

Update Info alert format
Copy link
Contributor

@calebk1 calebk1 left a comment

Choose a reason for hiding this comment

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

One more change, and then we should be all good!


When `Consent.update` API is called, the Consent extension uses Adobe Standard 2.0 to communicate with the Edge Network. Additionally, the property `metadata` is set to the time at which the API is called.

Here is an example where `Consent.update` is called to set collect consent to y:
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd phrase it more as "The following example shows when Consent.update is called to set collect consent to y:"

update typo
@emdobrin emdobrin merged commit 4941e22 into AdobeDocs:main Oct 5, 2023
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