admesh-ui-sdk 1.0.50 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/INTEGRATION_GUIDE.md +27 -0
- package/README.md +12 -4
- package/dist/brand-assistant.js +58 -58
- package/dist/brand-assistant.js.map +1 -1
- package/dist/components/AdMeshCompactCard.d.ts.map +1 -1
- package/dist/components/AdMeshIntentAssistant.d.ts +3 -1
- package/dist/components/AdMeshIntentAssistant.d.ts.map +1 -1
- package/dist/components/AdMeshRecommendations.d.ts +4 -2
- package/dist/components/AdMeshRecommendations.d.ts.map +1 -1
- package/dist/components/AdMeshTailAd.d.ts.map +1 -1
- package/dist/components/PublisherAssistantComposer.d.ts.map +1 -1
- package/dist/index.js +49 -49
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2746 -2618
- package/dist/index.mjs.map +1 -1
- package/dist/publisher-assistant.js +59 -59
- package/dist/publisher-assistant.js.map +1 -1
- package/dist/publisherAssistantEmbed.d.ts.map +1 -1
- package/dist/sdk/AdMeshSDK.d.ts.map +1 -1
- package/dist/utils/country-code.d.ts +2 -0
- package/dist/utils/country-code.d.ts.map +1 -0
- package/dist/utils/relatedArticleImages.d.ts +2 -0
- package/dist/utils/relatedArticleImages.d.ts.map +1 -0
- package/package.json +2 -2
package/INTEGRATION_GUIDE.md
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
Complete guide for integrating AdMesh UI components into your application.
|
|
4
4
|
|
|
5
|
+
## Visitor country
|
|
6
|
+
|
|
7
|
+
Browser and extension calls send `X-AdMesh-Transport: browser`. AdMesh detects
|
|
8
|
+
the visitor's country at the API from a recognized Cloudflare proxy or a bounded
|
|
9
|
+
public-IP lookup. A saved `location.countryCode` is only a hint; fresh browser
|
|
10
|
+
detection takes precedence. Missing or invalid country never defaults to US,
|
|
11
|
+
and language/locale does not determine country.
|
|
12
|
+
|
|
13
|
+
Server execution sends `X-AdMesh-Transport: server`. Supply the visitor country
|
|
14
|
+
your backend detected when receiving the browser request as
|
|
15
|
+
`location: { countryCode: 'IN' }`. The Node and Python Weave SDKs use their `geo` option for
|
|
16
|
+
this value. AdMesh does not geolocate your server as though it were the visitor.
|
|
17
|
+
These values are recorded as `platform_reported`, not independently verified.
|
|
18
|
+
Flutter calls identify browser or native-device transport automatically.
|
|
19
|
+
|
|
20
|
+
Country remains unknown when detection fails or a proxy chain cannot be
|
|
21
|
+
recognized. Unknown visitors are excluded from country-restricted Brand Agents;
|
|
22
|
+
explicit Global targeting remains eligible. IP location estimates the network's
|
|
23
|
+
country and can reflect a VPN or corporate gateway rather than physical location.
|
|
24
|
+
|
|
25
|
+
The API records `country`, `country_source`, and `country_resolution` in query,
|
|
26
|
+
auction, and recommendation records. SDK upgrades must be released together
|
|
27
|
+
with the backend country resolver. Do not configure ASGI to blindly trust
|
|
28
|
+
forwarded headers from arbitrary public clients. The resolver recognizes direct
|
|
29
|
+
Cloudflare connections and Cloud Run ingress whose last forwarded hop is
|
|
30
|
+
Cloudflare; other proxy chains require verification before enabling detection.
|
|
31
|
+
|
|
5
32
|
## 🚀 Getting Started
|
|
6
33
|
|
|
7
34
|
### Step 1: Install the Package
|
package/README.md
CHANGED
|
@@ -1667,7 +1667,15 @@ outside-click dismissal. Sponsored and regular suggestions use the same geometry
|
|
|
1667
1667
|
sponsored suggestions retain a distinct color and an Ad label. Ad cards keep
|
|
1668
1668
|
their existing design.
|
|
1669
1669
|
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1670
|
+
By default, always-visible suggestions accompany the page-view sponsored creative
|
|
1671
|
+
below the input container. The default script settings are:
|
|
1672
|
+
|
|
1673
|
+
```html
|
|
1674
|
+
data-suggestion-trigger="always"
|
|
1675
|
+
data-suggestion-placement="below"
|
|
1676
|
+
data-sponsored-creative-placement="below-input-container"
|
|
1677
|
+
```
|
|
1678
|
+
|
|
1679
|
+
The creative appears when the initial page-view auction returns a matching ad.
|
|
1680
|
+
Use `data-sponsored-creative-placement="none"` for suggestions only. React
|
|
1681
|
+
integrations use `sponsoredCreativePlacement="none"` to disable the card.
|