late-sdk 0.0.1305 → 0.0.1306
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.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/docs/ConnectApi.md +70 -0
- data/docs/ConnectWhopAdsCredentials200Response.md +24 -0
- data/docs/ConnectWhopAdsCredentialsRequest.md +24 -0
- data/docs/TrackingTagsApi.md +1 -1
- data/lib/zernio-sdk/api/accounts_api.rb +1 -1
- data/lib/zernio-sdk/api/connect_api.rb +68 -0
- data/lib/zernio-sdk/api/tracking_tags_api.rb +2 -2
- data/lib/zernio-sdk/models/account_with_follower_stats.rb +2 -2
- data/lib/zernio-sdk/models/connect_whop_ads_credentials200_response.rb +176 -0
- data/lib/zernio-sdk/models/connect_whop_ads_credentials_request.rb +212 -0
- data/lib/zernio-sdk/models/create_tracking_tag201_response.rb +2 -2
- data/lib/zernio-sdk/models/get_tracking_tag200_response.rb +2 -2
- data/lib/zernio-sdk/models/get_tracking_tag_stats200_response.rb +2 -2
- data/lib/zernio-sdk/models/get_tracking_tag_store_install200_response.rb +2 -2
- data/lib/zernio-sdk/models/install_tracking_tag_on_store200_response.rb +2 -2
- data/lib/zernio-sdk/models/list_tracking_tags200_response.rb +2 -2
- data/lib/zernio-sdk/models/remove_tracking_tag_from_store200_response.rb +2 -2
- data/lib/zernio-sdk/models/social_account.rb +2 -2
- data/lib/zernio-sdk/models/tracking_tag.rb +2 -2
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +2 -0
- data/openapi.yaml +1 -1
- data/spec/api/connect_api_spec.rb +12 -0
- data/spec/api/tracking_tags_api_spec.rb +1 -1
- data/spec/models/account_with_follower_stats_spec.rb +1 -1
- data/spec/models/connect_whop_ads_credentials200_response_spec.rb +54 -0
- data/spec/models/connect_whop_ads_credentials_request_spec.rb +54 -0
- data/spec/models/create_tracking_tag201_response_spec.rb +1 -1
- data/spec/models/get_tracking_tag200_response_spec.rb +1 -1
- data/spec/models/get_tracking_tag_stats200_response_spec.rb +1 -1
- data/spec/models/get_tracking_tag_store_install200_response_spec.rb +1 -1
- data/spec/models/install_tracking_tag_on_store200_response_spec.rb +1 -1
- data/spec/models/list_tracking_tags200_response_spec.rb +1 -1
- data/spec/models/remove_tracking_tag_from_store200_response_spec.rb +1 -1
- data/spec/models/social_account_spec.rb +1 -1
- data/spec/models/tracking_tag_spec.rb +1 -1
- data/zernio-sdk-0.0.1306.gem +0 -0
- metadata +10 -2
- data/zernio-sdk-0.0.1305.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 312a59ab9ed027c03d72db0f7ac8f7edc306a8639f64a64ae016e0cbd9c689b9
|
|
4
|
+
data.tar.gz: b79dac15904f70b3319269141355f8a78c56fde23072851bf85a570f30e9ed3f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dc4c5a01808c29c4278c9c3e06f63ece9dffa2663336c9f949defccf392a9b1b61162eb09b01289768f2f0d9c8966d4ba374bf641c578b638f50736dfb0793c8
|
|
7
|
+
data.tar.gz: fa6cd7763d216d8491d6d4428e35d45268172549c6389ac5c09cb21489852baa65d66bcab4d30e07a1833026ff35728a54d1c76e447562838be22c5d501c51ed
|
data/README.md
CHANGED
|
@@ -524,6 +524,7 @@ Class | Method | HTTP request | Description
|
|
|
524
524
|
*Zernio::ConnectApi* | [**connect_slack_channel**](docs/ConnectApi.md#connect_slack_channel) | **POST** /v1/connect/slack | Connect a Slack channel
|
|
525
525
|
*Zernio::ConnectApi* | [**connect_whats_app_credentials**](docs/ConnectApi.md#connect_whats_app_credentials) | **POST** /v1/connect/whatsapp/credentials | Connect WhatsApp via credentials
|
|
526
526
|
*Zernio::ConnectApi* | [**connect_whats_app_embedded_signup**](docs/ConnectApi.md#connect_whats_app_embedded_signup) | **POST** /v1/connect/whatsapp/embedded-signup | Connect WhatsApp from Embedded Signup
|
|
527
|
+
*Zernio::ConnectApi* | [**connect_whop_ads_credentials**](docs/ConnectApi.md#connect_whop_ads_credentials) | **POST** /v1/connect/whop-ads/credentials | Connect a Whop account
|
|
527
528
|
*Zernio::ConnectApi* | [**connect_word_press_with_application_password**](docs/ConnectApi.md#connect_word_press_with_application_password) | **POST** /v1/connect/wordpress/token | Connect self-hosted WordPress with an application password
|
|
528
529
|
*Zernio::ConnectApi* | [**create_pinterest_board**](docs/ConnectApi.md#create_pinterest_board) | **POST** /v1/accounts/{accountId}/pinterest-boards | Create Pinterest board
|
|
529
530
|
*Zernio::ConnectApi* | [**create_youtube_playlist**](docs/ConnectApi.md#create_youtube_playlist) | **POST** /v1/accounts/{accountId}/youtube-playlists | Create YouTube playlist
|
|
@@ -1387,6 +1388,8 @@ Class | Method | HTTP request | Description
|
|
|
1387
1388
|
- [Zernio::ConnectWhatsAppEmbeddedSignup200Response](docs/ConnectWhatsAppEmbeddedSignup200Response.md)
|
|
1388
1389
|
- [Zernio::ConnectWhatsAppEmbeddedSignup200ResponseAccount](docs/ConnectWhatsAppEmbeddedSignup200ResponseAccount.md)
|
|
1389
1390
|
- [Zernio::ConnectWhatsAppEmbeddedSignupRequest](docs/ConnectWhatsAppEmbeddedSignupRequest.md)
|
|
1391
|
+
- [Zernio::ConnectWhopAdsCredentials200Response](docs/ConnectWhopAdsCredentials200Response.md)
|
|
1392
|
+
- [Zernio::ConnectWhopAdsCredentialsRequest](docs/ConnectWhopAdsCredentialsRequest.md)
|
|
1390
1393
|
- [Zernio::ConnectWordPressWithApplicationPassword200Response](docs/ConnectWordPressWithApplicationPassword200Response.md)
|
|
1391
1394
|
- [Zernio::ConnectWordPressWithApplicationPassword200ResponseAccount](docs/ConnectWordPressWithApplicationPassword200ResponseAccount.md)
|
|
1392
1395
|
- [Zernio::ConnectWordPressWithApplicationPasswordRequest](docs/ConnectWordPressWithApplicationPasswordRequest.md)
|
data/docs/ConnectApi.md
CHANGED
|
@@ -17,6 +17,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
17
17
|
| [**connect_slack_channel**](ConnectApi.md#connect_slack_channel) | **POST** /v1/connect/slack | Connect a Slack channel |
|
|
18
18
|
| [**connect_whats_app_credentials**](ConnectApi.md#connect_whats_app_credentials) | **POST** /v1/connect/whatsapp/credentials | Connect WhatsApp via credentials |
|
|
19
19
|
| [**connect_whats_app_embedded_signup**](ConnectApi.md#connect_whats_app_embedded_signup) | **POST** /v1/connect/whatsapp/embedded-signup | Connect WhatsApp from Embedded Signup |
|
|
20
|
+
| [**connect_whop_ads_credentials**](ConnectApi.md#connect_whop_ads_credentials) | **POST** /v1/connect/whop-ads/credentials | Connect a Whop account |
|
|
20
21
|
| [**connect_word_press_with_application_password**](ConnectApi.md#connect_word_press_with_application_password) | **POST** /v1/connect/wordpress/token | Connect self-hosted WordPress with an application password |
|
|
21
22
|
| [**create_pinterest_board**](ConnectApi.md#create_pinterest_board) | **POST** /v1/accounts/{accountId}/pinterest-boards | Create Pinterest board |
|
|
22
23
|
| [**create_youtube_playlist**](ConnectApi.md#create_youtube_playlist) | **POST** /v1/accounts/{accountId}/youtube-playlists | Create YouTube playlist |
|
|
@@ -990,6 +991,75 @@ end
|
|
|
990
991
|
- **Accept**: application/json
|
|
991
992
|
|
|
992
993
|
|
|
994
|
+
## connect_whop_ads_credentials
|
|
995
|
+
|
|
996
|
+
> <ConnectWhopAdsCredentials200Response> connect_whop_ads_credentials(connect_whop_ads_credentials_request)
|
|
997
|
+
|
|
998
|
+
Connect a Whop account
|
|
999
|
+
|
|
1000
|
+
Connect a Whop account with an Account API key from the Whop dashboard (Developer > API keys). The key only has to be able to read its own account: Zernio calls `GET /accounts/me` once to learn the account id (`biz_...`) and name, then stores the key. What the connection unlocks today is the Whop Pixel through the tracking-tags API: the account id is the pixel, so `GET /v1/accounts/{accountId}/tracking-tags` lists it and `POST .../tracking-tags/{biz_...}/install` puts it on a Shopify store or WordPress site. Whop campaigns are not managed through Zernio. One Whop account per profile.
|
|
1001
|
+
|
|
1002
|
+
### Examples
|
|
1003
|
+
|
|
1004
|
+
```ruby
|
|
1005
|
+
require 'time'
|
|
1006
|
+
require 'zernio-sdk'
|
|
1007
|
+
# setup authorization
|
|
1008
|
+
Zernio.configure do |config|
|
|
1009
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
1010
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
1011
|
+
end
|
|
1012
|
+
|
|
1013
|
+
api_instance = Zernio::ConnectApi.new
|
|
1014
|
+
connect_whop_ads_credentials_request = Zernio::ConnectWhopAdsCredentialsRequest.new({api_key: 'api_key_example', profile_id: 'profile_id_example'}) # ConnectWhopAdsCredentialsRequest |
|
|
1015
|
+
|
|
1016
|
+
begin
|
|
1017
|
+
# Connect a Whop account
|
|
1018
|
+
result = api_instance.connect_whop_ads_credentials(connect_whop_ads_credentials_request)
|
|
1019
|
+
p result
|
|
1020
|
+
rescue Zernio::ApiError => e
|
|
1021
|
+
puts "Error when calling ConnectApi->connect_whop_ads_credentials: #{e}"
|
|
1022
|
+
end
|
|
1023
|
+
```
|
|
1024
|
+
|
|
1025
|
+
#### Using the connect_whop_ads_credentials_with_http_info variant
|
|
1026
|
+
|
|
1027
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1028
|
+
|
|
1029
|
+
> <Array(<ConnectWhopAdsCredentials200Response>, Integer, Hash)> connect_whop_ads_credentials_with_http_info(connect_whop_ads_credentials_request)
|
|
1030
|
+
|
|
1031
|
+
```ruby
|
|
1032
|
+
begin
|
|
1033
|
+
# Connect a Whop account
|
|
1034
|
+
data, status_code, headers = api_instance.connect_whop_ads_credentials_with_http_info(connect_whop_ads_credentials_request)
|
|
1035
|
+
p status_code # => 2xx
|
|
1036
|
+
p headers # => { ... }
|
|
1037
|
+
p data # => <ConnectWhopAdsCredentials200Response>
|
|
1038
|
+
rescue Zernio::ApiError => e
|
|
1039
|
+
puts "Error when calling ConnectApi->connect_whop_ads_credentials_with_http_info: #{e}"
|
|
1040
|
+
end
|
|
1041
|
+
```
|
|
1042
|
+
|
|
1043
|
+
### Parameters
|
|
1044
|
+
|
|
1045
|
+
| Name | Type | Description | Notes |
|
|
1046
|
+
| ---- | ---- | ----------- | ----- |
|
|
1047
|
+
| **connect_whop_ads_credentials_request** | [**ConnectWhopAdsCredentialsRequest**](ConnectWhopAdsCredentialsRequest.md) | | |
|
|
1048
|
+
|
|
1049
|
+
### Return type
|
|
1050
|
+
|
|
1051
|
+
[**ConnectWhopAdsCredentials200Response**](ConnectWhopAdsCredentials200Response.md)
|
|
1052
|
+
|
|
1053
|
+
### Authorization
|
|
1054
|
+
|
|
1055
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
1056
|
+
|
|
1057
|
+
### HTTP request headers
|
|
1058
|
+
|
|
1059
|
+
- **Content-Type**: application/json
|
|
1060
|
+
- **Accept**: application/json
|
|
1061
|
+
|
|
1062
|
+
|
|
993
1063
|
## connect_word_press_with_application_password
|
|
994
1064
|
|
|
995
1065
|
> <ConnectWordPressWithApplicationPassword200Response> connect_word_press_with_application_password(connect_word_press_with_application_password_request)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Zernio::ConnectWhopAdsCredentials200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **account_id** | **String** | The Zernio account id (platform `whopads`) to use as `{accountId}` on the tracking-tags routes. | [optional] |
|
|
8
|
+
| **whop_account_id** | **String** | The Whop account id (`biz_...`), which is also the tracking tag id. | [optional] |
|
|
9
|
+
| **account_name** | **String** | | [optional] |
|
|
10
|
+
| **redirect_url** | **String** | | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'zernio-sdk'
|
|
16
|
+
|
|
17
|
+
instance = Zernio::ConnectWhopAdsCredentials200Response.new(
|
|
18
|
+
account_id: null,
|
|
19
|
+
whop_account_id: null,
|
|
20
|
+
account_name: null,
|
|
21
|
+
redirect_url: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Zernio::ConnectWhopAdsCredentialsRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **api_key** | **String** | Account API key from the Whop dashboard. | |
|
|
8
|
+
| **profile_id** | **String** | Your Zernio profile ID | |
|
|
9
|
+
| **state** | **String** | Optional state passthrough for the connect flow. | [optional] |
|
|
10
|
+
| **redirect_url** | **String** | Optional URL to redirect to after successful connection, echoed back as redirectUrl. | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'zernio-sdk'
|
|
16
|
+
|
|
17
|
+
instance = Zernio::ConnectWhopAdsCredentialsRequest.new(
|
|
18
|
+
api_key: null,
|
|
19
|
+
profile_id: null,
|
|
20
|
+
state: null,
|
|
21
|
+
redirect_url: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
data/docs/TrackingTagsApi.md
CHANGED
|
@@ -774,7 +774,7 @@ end
|
|
|
774
774
|
|
|
775
775
|
Install on a Shopify store or WordPress site
|
|
776
776
|
|
|
777
|
-
Puts the Meta pixel on a connected Shopify store's storefront and checkout through Zernio's Shopify web pixel (a Shopify app pixel, no theme edits). The store then sends PageView, ViewContent, AddToCart, Search, InitiateCheckout, AddPaymentInfo and Purchase (with value, currency, content_ids and contents) to the pixel, each with an event id. Purchase uses `shopify_order_{orderId}` as its event id, so a Conversions API Purchase you send for the same order with that `eventId` is deduplicated by Meta. Idempotent: a store runs one Zernio web pixel holding one tag per platform, so calling it again updates the install, installing a different tag of the same platform replaces the previous one (reported in `replacedTagId`), and other platforms' tags are kept. Events respect the store's customer privacy settings (marketing consent). `accountId` is the Meta ads account that owns the pixel (`tagId`); `storeAccountId` is the Shopify account. OpenAI Ads on Shopify: each event is sent through OpenAI's documented image tag (`GET https://bzr.openai.com/v1/sdk/events`) as `page_viewed`, `contents_viewed`, `items_added`, `checkout_started`, `order_created`, and custom events `search` and `addpaymentinfo` (lowercase, so a Conversions API Search/AddPaymentInfo with the same event id deduplicates). Amounts are sent in the currency's minor unit. The landing page's `oppref` click id is kept in the `__oppref` cookie for 30 days and sent with every event. The image tag cannot carry the `__obref` browser id (OpenAI rejects the parameter), and the search text is never sent. On WordPress the widget holds the official `oaiq` base code and a `page_viewed` call. Stores connected before pixel support must re-approve the Zernio app: the call then answers 409 `reconnect_required` with `details.authUrl` to send the merchant to (the Shopify account id stays the same). Platforms without an install path return 501. **WordPress** (`storeAccountId` is a connected WordPress.com or self-hosted site): Zernio adds a Custom HTML widget with the Meta pixel base code (fbevents.js, `init`, `PageView`) to a widget area of the active theme (a footer area when there is one, else the first active area; pass `sidebarId` to choose), then reads the widget back to confirm WordPress kept the `<script>` tag. The widget carries a Zernio marker, so the call is idempotent per pixel: repeating it updates or moves the same widget, and pixel code the site owner pasted by hand is never touched. Several pixels can run side by side (one widget each). When the site cannot run the pixel, nothing is left behind and the call answers 422 `tracking_tag_install_blocked` with `details.reason`: - `insufficient_permissions`: the connected user lacks `edit_theme_options` (needs Administrator). - `scripts_stripped`: WordPress removed the script (the user lacks `unfiltered_html`, e.g. a multisite admin who is not a Super Admin, or `DISALLOW_UNFILTERED_HTML` is set). - `wordpress_com_plan`: a WordPress.com plan that strips scripts (plans without plugins). - `no_widget_areas`: the theme has no widget areas (block themes such as Twenty Twenty-Five). - `widgets_api_unavailable`: no widgets REST API (WordPress older than 5.8, or disabled). The `error` message names the manual alternative (Meta's official WordPress plugin). With `verifyHomepage` (default true) the homepage is fetched afterwards and `homepageCheck` says whether the pixel is visible; `not_found` can be a stale page cache, the widget read-back is authoritative. **LinkedIn** (`linkedinads`): Shopify sends every page view to the Insight Tag, plus each store event that has an enabled event-specific Insight Tag conversion rule of the matching type (view_content = VIEW_CONTENT, add_to_cart = ADD_TO_CART, search = SEARCH, initiate_checkout = START_CHECKOUT, add_payment_info = ADD_BILLING_INFO, purchase = PURCHASE). Each conversion carries the event id; Purchase uses `shopify_order_{orderId}`, so a Conversions API event sent to a separate CONVERSIONS_API rule with that `eventId` is deduplicated by LinkedIn. Conversions API rules cannot be fired from a page, and no rule is created for you. The `li_fat_id` click id is read from the landing URL and kept in a first-party cookie for 30 days. WordPress gets LinkedIn's base code, which records page views. **Pinterest (platform `pinterestads`)**: Shopify sends `pagevisit`, `viewcontent`, `addtocart`, `search`, `initiatecheckout`, `addpaymentinfo` and `checkout` to the tag, each with `event_id` (Purchase: `shopify_order_{orderId}`, for dedup with the Pinterest Conversions API), value, currency, order quantity and line items, plus the `epik` click id kept in the `_epik` cookie. WordPress gets Pinterest's base code (core.js, `load`, `page`) with a `pagevisit` event; the manual fallback is the official Pinterest for WooCommerce plugin (WooCommerce stores).
|
|
777
|
+
Puts the Meta pixel on a connected Shopify store's storefront and checkout through Zernio's Shopify web pixel (a Shopify app pixel, no theme edits). The store then sends PageView, ViewContent, AddToCart, Search, InitiateCheckout, AddPaymentInfo and Purchase (with value, currency, content_ids and contents) to the pixel, each with an event id. Purchase uses `shopify_order_{orderId}` as its event id, so a Conversions API Purchase you send for the same order with that `eventId` is deduplicated by Meta. Idempotent: a store runs one Zernio web pixel holding one tag per platform, so calling it again updates the install, installing a different tag of the same platform replaces the previous one (reported in `replacedTagId`), and other platforms' tags are kept. Events respect the store's customer privacy settings (marketing consent). `accountId` is the Meta ads account that owns the pixel (`tagId`); `storeAccountId` is the Shopify account. OpenAI Ads on Shopify: each event is sent through OpenAI's documented image tag (`GET https://bzr.openai.com/v1/sdk/events`) as `page_viewed`, `contents_viewed`, `items_added`, `checkout_started`, `order_created`, and custom events `search` and `addpaymentinfo` (lowercase, so a Conversions API Search/AddPaymentInfo with the same event id deduplicates). Amounts are sent in the currency's minor unit. The landing page's `oppref` click id is kept in the `__oppref` cookie for 30 days and sent with every event. The image tag cannot carry the `__obref` browser id (OpenAI rejects the parameter), and the search text is never sent. On WordPress the widget holds the official `oaiq` base code and a `page_viewed` call. Whop (`whopads`, `tagId` = the Whop account id `biz_...`) on Shopify: events are posted to Whop's conversions endpoint (`https://t.whop.tw/conversions`) the way Whop's own Shopify pixel does: `page`, `view_content`, `add_to_cart`, `purchase` (with value and currency) and the custom `shopify_search_submitted`, `shopify_checkout_started` and `shopify_payment_info_submitted`, each with Whop's `shopify:<event>:<id>` event id so a store that also runs Whop's own pixel reports each event once. The visitor id is kept in Whop's `_wuid` cookie for two years. Whop records purchases itself only for checkouts on Whop, so Shopify orders are reported here. On WordPress the widget holds the official snippet with `whop.setScope` and `whop.track(\"page\")`. Stores connected before pixel support must re-approve the Zernio app: the call then answers 409 `reconnect_required` with `details.authUrl` to send the merchant to (the Shopify account id stays the same). Platforms without an install path return 501. **WordPress** (`storeAccountId` is a connected WordPress.com or self-hosted site): Zernio adds a Custom HTML widget with the Meta pixel base code (fbevents.js, `init`, `PageView`) to a widget area of the active theme (a footer area when there is one, else the first active area; pass `sidebarId` to choose), then reads the widget back to confirm WordPress kept the `<script>` tag. The widget carries a Zernio marker, so the call is idempotent per pixel: repeating it updates or moves the same widget, and pixel code the site owner pasted by hand is never touched. Several pixels can run side by side (one widget each). When the site cannot run the pixel, nothing is left behind and the call answers 422 `tracking_tag_install_blocked` with `details.reason`: - `insufficient_permissions`: the connected user lacks `edit_theme_options` (needs Administrator). - `scripts_stripped`: WordPress removed the script (the user lacks `unfiltered_html`, e.g. a multisite admin who is not a Super Admin, or `DISALLOW_UNFILTERED_HTML` is set). - `wordpress_com_plan`: a WordPress.com plan that strips scripts (plans without plugins). - `no_widget_areas`: the theme has no widget areas (block themes such as Twenty Twenty-Five). - `widgets_api_unavailable`: no widgets REST API (WordPress older than 5.8, or disabled). The `error` message names the manual alternative (Meta's official WordPress plugin). With `verifyHomepage` (default true) the homepage is fetched afterwards and `homepageCheck` says whether the pixel is visible; `not_found` can be a stale page cache, the widget read-back is authoritative. **LinkedIn** (`linkedinads`): Shopify sends every page view to the Insight Tag, plus each store event that has an enabled event-specific Insight Tag conversion rule of the matching type (view_content = VIEW_CONTENT, add_to_cart = ADD_TO_CART, search = SEARCH, initiate_checkout = START_CHECKOUT, add_payment_info = ADD_BILLING_INFO, purchase = PURCHASE). Each conversion carries the event id; Purchase uses `shopify_order_{orderId}`, so a Conversions API event sent to a separate CONVERSIONS_API rule with that `eventId` is deduplicated by LinkedIn. Conversions API rules cannot be fired from a page, and no rule is created for you. The `li_fat_id` click id is read from the landing URL and kept in a first-party cookie for 30 days. WordPress gets LinkedIn's base code, which records page views. **Pinterest (platform `pinterestads`)**: Shopify sends `pagevisit`, `viewcontent`, `addtocart`, `search`, `initiatecheckout`, `addpaymentinfo` and `checkout` to the tag, each with `event_id` (Purchase: `shopify_order_{orderId}`, for dedup with the Pinterest Conversions API), value, currency, order quantity and line items, plus the `epik` click id kept in the `_epik` cookie. WordPress gets Pinterest's base code (core.js, `load`, `page`) with a `pagevisit` event; the manual fallback is the official Pinterest for WooCommerce plugin (WooCommerce stores).
|
|
778
778
|
|
|
779
779
|
### Examples
|
|
780
780
|
|
|
@@ -231,7 +231,7 @@ module Zernio
|
|
|
231
231
|
if @api_client.config.debugging
|
|
232
232
|
@api_client.config.logger.debug 'Calling API: AccountsApi.get_all_accounts_health ...'
|
|
233
233
|
end
|
|
234
|
-
allowable_values = ["facebook", "instagram", "linkedin", "twitter", "tiktok", "youtube", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "discord", "slack", "whatsapp", "shopify", "wordpress", "linkedinads", "metaads", "pinterestads", "tiktokads", "xads", "googleads", "openaiads"]
|
|
234
|
+
allowable_values = ["facebook", "instagram", "linkedin", "twitter", "tiktok", "youtube", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "discord", "slack", "whatsapp", "shopify", "wordpress", "linkedinads", "metaads", "pinterestads", "tiktokads", "xads", "googleads", "openaiads", "whopads"]
|
|
235
235
|
if @api_client.config.client_side_validation && opts[:'platform'] && !allowable_values.include?(opts[:'platform'])
|
|
236
236
|
fail ArgumentError, "invalid value for \"platform\", must be one of #{allowable_values}"
|
|
237
237
|
end
|
|
@@ -960,6 +960,74 @@ module Zernio
|
|
|
960
960
|
return data, status_code, headers
|
|
961
961
|
end
|
|
962
962
|
|
|
963
|
+
# Connect a Whop account
|
|
964
|
+
# Connect a Whop account with an Account API key from the Whop dashboard (Developer > API keys). The key only has to be able to read its own account: Zernio calls `GET /accounts/me` once to learn the account id (`biz_...`) and name, then stores the key. What the connection unlocks today is the Whop Pixel through the tracking-tags API: the account id is the pixel, so `GET /v1/accounts/{accountId}/tracking-tags` lists it and `POST .../tracking-tags/{biz_...}/install` puts it on a Shopify store or WordPress site. Whop campaigns are not managed through Zernio. One Whop account per profile.
|
|
965
|
+
# @param connect_whop_ads_credentials_request [ConnectWhopAdsCredentialsRequest]
|
|
966
|
+
# @param [Hash] opts the optional parameters
|
|
967
|
+
# @return [ConnectWhopAdsCredentials200Response]
|
|
968
|
+
def connect_whop_ads_credentials(connect_whop_ads_credentials_request, opts = {})
|
|
969
|
+
data, _status_code, _headers = connect_whop_ads_credentials_with_http_info(connect_whop_ads_credentials_request, opts)
|
|
970
|
+
data
|
|
971
|
+
end
|
|
972
|
+
|
|
973
|
+
# Connect a Whop account
|
|
974
|
+
# Connect a Whop account with an Account API key from the Whop dashboard (Developer > API keys). The key only has to be able to read its own account: Zernio calls `GET /accounts/me` once to learn the account id (`biz_...`) and name, then stores the key. What the connection unlocks today is the Whop Pixel through the tracking-tags API: the account id is the pixel, so `GET /v1/accounts/{accountId}/tracking-tags` lists it and `POST .../tracking-tags/{biz_...}/install` puts it on a Shopify store or WordPress site. Whop campaigns are not managed through Zernio. One Whop account per profile.
|
|
975
|
+
# @param connect_whop_ads_credentials_request [ConnectWhopAdsCredentialsRequest]
|
|
976
|
+
# @param [Hash] opts the optional parameters
|
|
977
|
+
# @return [Array<(ConnectWhopAdsCredentials200Response, Integer, Hash)>] ConnectWhopAdsCredentials200Response data, response status code and response headers
|
|
978
|
+
def connect_whop_ads_credentials_with_http_info(connect_whop_ads_credentials_request, opts = {})
|
|
979
|
+
if @api_client.config.debugging
|
|
980
|
+
@api_client.config.logger.debug 'Calling API: ConnectApi.connect_whop_ads_credentials ...'
|
|
981
|
+
end
|
|
982
|
+
# verify the required parameter 'connect_whop_ads_credentials_request' is set
|
|
983
|
+
if @api_client.config.client_side_validation && connect_whop_ads_credentials_request.nil?
|
|
984
|
+
fail ArgumentError, "Missing the required parameter 'connect_whop_ads_credentials_request' when calling ConnectApi.connect_whop_ads_credentials"
|
|
985
|
+
end
|
|
986
|
+
# resource path
|
|
987
|
+
local_var_path = '/v1/connect/whop-ads/credentials'
|
|
988
|
+
|
|
989
|
+
# query parameters
|
|
990
|
+
query_params = opts[:query_params] || {}
|
|
991
|
+
|
|
992
|
+
# header parameters
|
|
993
|
+
header_params = opts[:header_params] || {}
|
|
994
|
+
# HTTP header 'Accept' (if needed)
|
|
995
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
996
|
+
# HTTP header 'Content-Type'
|
|
997
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
998
|
+
if !content_type.nil?
|
|
999
|
+
header_params['Content-Type'] = content_type
|
|
1000
|
+
end
|
|
1001
|
+
|
|
1002
|
+
# form parameters
|
|
1003
|
+
form_params = opts[:form_params] || {}
|
|
1004
|
+
|
|
1005
|
+
# http body (model)
|
|
1006
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(connect_whop_ads_credentials_request)
|
|
1007
|
+
|
|
1008
|
+
# return_type
|
|
1009
|
+
return_type = opts[:debug_return_type] || 'ConnectWhopAdsCredentials200Response'
|
|
1010
|
+
|
|
1011
|
+
# auth_names
|
|
1012
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1013
|
+
|
|
1014
|
+
new_options = opts.merge(
|
|
1015
|
+
:operation => :"ConnectApi.connect_whop_ads_credentials",
|
|
1016
|
+
:header_params => header_params,
|
|
1017
|
+
:query_params => query_params,
|
|
1018
|
+
:form_params => form_params,
|
|
1019
|
+
:body => post_body,
|
|
1020
|
+
:auth_names => auth_names,
|
|
1021
|
+
:return_type => return_type
|
|
1022
|
+
)
|
|
1023
|
+
|
|
1024
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1025
|
+
if @api_client.config.debugging
|
|
1026
|
+
@api_client.config.logger.debug "API called: ConnectApi#connect_whop_ads_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1027
|
+
end
|
|
1028
|
+
return data, status_code, headers
|
|
1029
|
+
end
|
|
1030
|
+
|
|
963
1031
|
# Connect self-hosted WordPress with an application password
|
|
964
1032
|
# Connects one self-hosted WordPress site using a WordPress username and application password. `siteUrl` must use HTTPS and may include the path where WordPress is installed. Zernio discovers the REST API, verifies the credentials and required post/media/taxonomy capabilities, then stores the password encrypted. Create an application password in the WordPress user's profile; do not send the user's login password. Reconnecting the same site and profile updates the connection in place.
|
|
965
1033
|
# @param connect_word_press_with_application_password_request [ConnectWordPressWithApplicationPasswordRequest]
|
|
@@ -780,7 +780,7 @@ module Zernio
|
|
|
780
780
|
end
|
|
781
781
|
|
|
782
782
|
# Install on a Shopify store or WordPress site
|
|
783
|
-
# Puts the Meta pixel on a connected Shopify store's storefront and checkout through Zernio's Shopify web pixel (a Shopify app pixel, no theme edits). The store then sends PageView, ViewContent, AddToCart, Search, InitiateCheckout, AddPaymentInfo and Purchase (with value, currency, content_ids and contents) to the pixel, each with an event id. Purchase uses `shopify_order_{orderId}` as its event id, so a Conversions API Purchase you send for the same order with that `eventId` is deduplicated by Meta. Idempotent: a store runs one Zernio web pixel holding one tag per platform, so calling it again updates the install, installing a different tag of the same platform replaces the previous one (reported in `replacedTagId`), and other platforms' tags are kept. Events respect the store's customer privacy settings (marketing consent). `accountId` is the Meta ads account that owns the pixel (`tagId`); `storeAccountId` is the Shopify account. OpenAI Ads on Shopify: each event is sent through OpenAI's documented image tag (`GET https://bzr.openai.com/v1/sdk/events`) as `page_viewed`, `contents_viewed`, `items_added`, `checkout_started`, `order_created`, and custom events `search` and `addpaymentinfo` (lowercase, so a Conversions API Search/AddPaymentInfo with the same event id deduplicates). Amounts are sent in the currency's minor unit. The landing page's `oppref` click id is kept in the `__oppref` cookie for 30 days and sent with every event. The image tag cannot carry the `__obref` browser id (OpenAI rejects the parameter), and the search text is never sent. On WordPress the widget holds the official `oaiq` base code and a `page_viewed` call. Stores connected before pixel support must re-approve the Zernio app: the call then answers 409 `reconnect_required` with `details.authUrl` to send the merchant to (the Shopify account id stays the same). Platforms without an install path return 501. **WordPress** (`storeAccountId` is a connected WordPress.com or self-hosted site): Zernio adds a Custom HTML widget with the Meta pixel base code (fbevents.js, `init`, `PageView`) to a widget area of the active theme (a footer area when there is one, else the first active area; pass `sidebarId` to choose), then reads the widget back to confirm WordPress kept the `<script>` tag. The widget carries a Zernio marker, so the call is idempotent per pixel: repeating it updates or moves the same widget, and pixel code the site owner pasted by hand is never touched. Several pixels can run side by side (one widget each). When the site cannot run the pixel, nothing is left behind and the call answers 422 `tracking_tag_install_blocked` with `details.reason`: - `insufficient_permissions`: the connected user lacks `edit_theme_options` (needs Administrator). - `scripts_stripped`: WordPress removed the script (the user lacks `unfiltered_html`, e.g. a multisite admin who is not a Super Admin, or `DISALLOW_UNFILTERED_HTML` is set). - `wordpress_com_plan`: a WordPress.com plan that strips scripts (plans without plugins). - `no_widget_areas`: the theme has no widget areas (block themes such as Twenty Twenty-Five). - `widgets_api_unavailable`: no widgets REST API (WordPress older than 5.8, or disabled). The `error` message names the manual alternative (Meta's official WordPress plugin). With `verifyHomepage` (default true) the homepage is fetched afterwards and `homepageCheck` says whether the pixel is visible; `not_found` can be a stale page cache, the widget read-back is authoritative. **LinkedIn** (`linkedinads`): Shopify sends every page view to the Insight Tag, plus each store event that has an enabled event-specific Insight Tag conversion rule of the matching type (view_content = VIEW_CONTENT, add_to_cart = ADD_TO_CART, search = SEARCH, initiate_checkout = START_CHECKOUT, add_payment_info = ADD_BILLING_INFO, purchase = PURCHASE). Each conversion carries the event id; Purchase uses `shopify_order_{orderId}`, so a Conversions API event sent to a separate CONVERSIONS_API rule with that `eventId` is deduplicated by LinkedIn. Conversions API rules cannot be fired from a page, and no rule is created for you. The `li_fat_id` click id is read from the landing URL and kept in a first-party cookie for 30 days. WordPress gets LinkedIn's base code, which records page views. **Pinterest (platform `pinterestads`)**: Shopify sends `pagevisit`, `viewcontent`, `addtocart`, `search`, `initiatecheckout`, `addpaymentinfo` and `checkout` to the tag, each with `event_id` (Purchase: `shopify_order_{orderId}`, for dedup with the Pinterest Conversions API), value, currency, order quantity and line items, plus the `epik` click id kept in the `_epik` cookie. WordPress gets Pinterest's base code (core.js, `load`, `page`) with a `pagevisit` event; the manual fallback is the official Pinterest for WooCommerce plugin (WooCommerce stores).
|
|
783
|
+
# Puts the Meta pixel on a connected Shopify store's storefront and checkout through Zernio's Shopify web pixel (a Shopify app pixel, no theme edits). The store then sends PageView, ViewContent, AddToCart, Search, InitiateCheckout, AddPaymentInfo and Purchase (with value, currency, content_ids and contents) to the pixel, each with an event id. Purchase uses `shopify_order_{orderId}` as its event id, so a Conversions API Purchase you send for the same order with that `eventId` is deduplicated by Meta. Idempotent: a store runs one Zernio web pixel holding one tag per platform, so calling it again updates the install, installing a different tag of the same platform replaces the previous one (reported in `replacedTagId`), and other platforms' tags are kept. Events respect the store's customer privacy settings (marketing consent). `accountId` is the Meta ads account that owns the pixel (`tagId`); `storeAccountId` is the Shopify account. OpenAI Ads on Shopify: each event is sent through OpenAI's documented image tag (`GET https://bzr.openai.com/v1/sdk/events`) as `page_viewed`, `contents_viewed`, `items_added`, `checkout_started`, `order_created`, and custom events `search` and `addpaymentinfo` (lowercase, so a Conversions API Search/AddPaymentInfo with the same event id deduplicates). Amounts are sent in the currency's minor unit. The landing page's `oppref` click id is kept in the `__oppref` cookie for 30 days and sent with every event. The image tag cannot carry the `__obref` browser id (OpenAI rejects the parameter), and the search text is never sent. On WordPress the widget holds the official `oaiq` base code and a `page_viewed` call. Whop (`whopads`, `tagId` = the Whop account id `biz_...`) on Shopify: events are posted to Whop's conversions endpoint (`https://t.whop.tw/conversions`) the way Whop's own Shopify pixel does: `page`, `view_content`, `add_to_cart`, `purchase` (with value and currency) and the custom `shopify_search_submitted`, `shopify_checkout_started` and `shopify_payment_info_submitted`, each with Whop's `shopify:<event>:<id>` event id so a store that also runs Whop's own pixel reports each event once. The visitor id is kept in Whop's `_wuid` cookie for two years. Whop records purchases itself only for checkouts on Whop, so Shopify orders are reported here. On WordPress the widget holds the official snippet with `whop.setScope` and `whop.track(\"page\")`. Stores connected before pixel support must re-approve the Zernio app: the call then answers 409 `reconnect_required` with `details.authUrl` to send the merchant to (the Shopify account id stays the same). Platforms without an install path return 501. **WordPress** (`storeAccountId` is a connected WordPress.com or self-hosted site): Zernio adds a Custom HTML widget with the Meta pixel base code (fbevents.js, `init`, `PageView`) to a widget area of the active theme (a footer area when there is one, else the first active area; pass `sidebarId` to choose), then reads the widget back to confirm WordPress kept the `<script>` tag. The widget carries a Zernio marker, so the call is idempotent per pixel: repeating it updates or moves the same widget, and pixel code the site owner pasted by hand is never touched. Several pixels can run side by side (one widget each). When the site cannot run the pixel, nothing is left behind and the call answers 422 `tracking_tag_install_blocked` with `details.reason`: - `insufficient_permissions`: the connected user lacks `edit_theme_options` (needs Administrator). - `scripts_stripped`: WordPress removed the script (the user lacks `unfiltered_html`, e.g. a multisite admin who is not a Super Admin, or `DISALLOW_UNFILTERED_HTML` is set). - `wordpress_com_plan`: a WordPress.com plan that strips scripts (plans without plugins). - `no_widget_areas`: the theme has no widget areas (block themes such as Twenty Twenty-Five). - `widgets_api_unavailable`: no widgets REST API (WordPress older than 5.8, or disabled). The `error` message names the manual alternative (Meta's official WordPress plugin). With `verifyHomepage` (default true) the homepage is fetched afterwards and `homepageCheck` says whether the pixel is visible; `not_found` can be a stale page cache, the widget read-back is authoritative. **LinkedIn** (`linkedinads`): Shopify sends every page view to the Insight Tag, plus each store event that has an enabled event-specific Insight Tag conversion rule of the matching type (view_content = VIEW_CONTENT, add_to_cart = ADD_TO_CART, search = SEARCH, initiate_checkout = START_CHECKOUT, add_payment_info = ADD_BILLING_INFO, purchase = PURCHASE). Each conversion carries the event id; Purchase uses `shopify_order_{orderId}`, so a Conversions API event sent to a separate CONVERSIONS_API rule with that `eventId` is deduplicated by LinkedIn. Conversions API rules cannot be fired from a page, and no rule is created for you. The `li_fat_id` click id is read from the landing URL and kept in a first-party cookie for 30 days. WordPress gets LinkedIn's base code, which records page views. **Pinterest (platform `pinterestads`)**: Shopify sends `pagevisit`, `viewcontent`, `addtocart`, `search`, `initiatecheckout`, `addpaymentinfo` and `checkout` to the tag, each with `event_id` (Purchase: `shopify_order_{orderId}`, for dedup with the Pinterest Conversions API), value, currency, order quantity and line items, plus the `epik` click id kept in the `_epik` cookie. WordPress gets Pinterest's base code (core.js, `load`, `page`) with a `pagevisit` event; the manual fallback is the official Pinterest for WooCommerce plugin (WooCommerce stores).
|
|
784
784
|
# @param account_id [String]
|
|
785
785
|
# @param tag_id [String] Tag id (`TrackingTag.id`).
|
|
786
786
|
# @param install_tracking_tag_on_store_request [InstallTrackingTagOnStoreRequest]
|
|
@@ -792,7 +792,7 @@ module Zernio
|
|
|
792
792
|
end
|
|
793
793
|
|
|
794
794
|
# Install on a Shopify store or WordPress site
|
|
795
|
-
# Puts the Meta pixel on a connected Shopify store's storefront and checkout through Zernio's Shopify web pixel (a Shopify app pixel, no theme edits). The store then sends PageView, ViewContent, AddToCart, Search, InitiateCheckout, AddPaymentInfo and Purchase (with value, currency, content_ids and contents) to the pixel, each with an event id. Purchase uses `shopify_order_{orderId}` as its event id, so a Conversions API Purchase you send for the same order with that `eventId` is deduplicated by Meta. Idempotent: a store runs one Zernio web pixel holding one tag per platform, so calling it again updates the install, installing a different tag of the same platform replaces the previous one (reported in `replacedTagId`), and other platforms' tags are kept. Events respect the store's customer privacy settings (marketing consent). `accountId` is the Meta ads account that owns the pixel (`tagId`); `storeAccountId` is the Shopify account. OpenAI Ads on Shopify: each event is sent through OpenAI's documented image tag (`GET https://bzr.openai.com/v1/sdk/events`) as `page_viewed`, `contents_viewed`, `items_added`, `checkout_started`, `order_created`, and custom events `search` and `addpaymentinfo` (lowercase, so a Conversions API Search/AddPaymentInfo with the same event id deduplicates). Amounts are sent in the currency's minor unit. The landing page's `oppref` click id is kept in the `__oppref` cookie for 30 days and sent with every event. The image tag cannot carry the `__obref` browser id (OpenAI rejects the parameter), and the search text is never sent. On WordPress the widget holds the official `oaiq` base code and a `page_viewed` call. Stores connected before pixel support must re-approve the Zernio app: the call then answers 409 `reconnect_required` with `details.authUrl` to send the merchant to (the Shopify account id stays the same). Platforms without an install path return 501. **WordPress** (`storeAccountId` is a connected WordPress.com or self-hosted site): Zernio adds a Custom HTML widget with the Meta pixel base code (fbevents.js, `init`, `PageView`) to a widget area of the active theme (a footer area when there is one, else the first active area; pass `sidebarId` to choose), then reads the widget back to confirm WordPress kept the `<script>` tag. The widget carries a Zernio marker, so the call is idempotent per pixel: repeating it updates or moves the same widget, and pixel code the site owner pasted by hand is never touched. Several pixels can run side by side (one widget each). When the site cannot run the pixel, nothing is left behind and the call answers 422 `tracking_tag_install_blocked` with `details.reason`: - `insufficient_permissions`: the connected user lacks `edit_theme_options` (needs Administrator). - `scripts_stripped`: WordPress removed the script (the user lacks `unfiltered_html`, e.g. a multisite admin who is not a Super Admin, or `DISALLOW_UNFILTERED_HTML` is set). - `wordpress_com_plan`: a WordPress.com plan that strips scripts (plans without plugins). - `no_widget_areas`: the theme has no widget areas (block themes such as Twenty Twenty-Five). - `widgets_api_unavailable`: no widgets REST API (WordPress older than 5.8, or disabled). The `error` message names the manual alternative (Meta's official WordPress plugin). With `verifyHomepage` (default true) the homepage is fetched afterwards and `homepageCheck` says whether the pixel is visible; `not_found` can be a stale page cache, the widget read-back is authoritative. **LinkedIn** (`linkedinads`): Shopify sends every page view to the Insight Tag, plus each store event that has an enabled event-specific Insight Tag conversion rule of the matching type (view_content = VIEW_CONTENT, add_to_cart = ADD_TO_CART, search = SEARCH, initiate_checkout = START_CHECKOUT, add_payment_info = ADD_BILLING_INFO, purchase = PURCHASE). Each conversion carries the event id; Purchase uses `shopify_order_{orderId}`, so a Conversions API event sent to a separate CONVERSIONS_API rule with that `eventId` is deduplicated by LinkedIn. Conversions API rules cannot be fired from a page, and no rule is created for you. The `li_fat_id` click id is read from the landing URL and kept in a first-party cookie for 30 days. WordPress gets LinkedIn's base code, which records page views. **Pinterest (platform `pinterestads`)**: Shopify sends `pagevisit`, `viewcontent`, `addtocart`, `search`, `initiatecheckout`, `addpaymentinfo` and `checkout` to the tag, each with `event_id` (Purchase: `shopify_order_{orderId}`, for dedup with the Pinterest Conversions API), value, currency, order quantity and line items, plus the `epik` click id kept in the `_epik` cookie. WordPress gets Pinterest's base code (core.js, `load`, `page`) with a `pagevisit` event; the manual fallback is the official Pinterest for WooCommerce plugin (WooCommerce stores).
|
|
795
|
+
# Puts the Meta pixel on a connected Shopify store's storefront and checkout through Zernio's Shopify web pixel (a Shopify app pixel, no theme edits). The store then sends PageView, ViewContent, AddToCart, Search, InitiateCheckout, AddPaymentInfo and Purchase (with value, currency, content_ids and contents) to the pixel, each with an event id. Purchase uses `shopify_order_{orderId}` as its event id, so a Conversions API Purchase you send for the same order with that `eventId` is deduplicated by Meta. Idempotent: a store runs one Zernio web pixel holding one tag per platform, so calling it again updates the install, installing a different tag of the same platform replaces the previous one (reported in `replacedTagId`), and other platforms' tags are kept. Events respect the store's customer privacy settings (marketing consent). `accountId` is the Meta ads account that owns the pixel (`tagId`); `storeAccountId` is the Shopify account. OpenAI Ads on Shopify: each event is sent through OpenAI's documented image tag (`GET https://bzr.openai.com/v1/sdk/events`) as `page_viewed`, `contents_viewed`, `items_added`, `checkout_started`, `order_created`, and custom events `search` and `addpaymentinfo` (lowercase, so a Conversions API Search/AddPaymentInfo with the same event id deduplicates). Amounts are sent in the currency's minor unit. The landing page's `oppref` click id is kept in the `__oppref` cookie for 30 days and sent with every event. The image tag cannot carry the `__obref` browser id (OpenAI rejects the parameter), and the search text is never sent. On WordPress the widget holds the official `oaiq` base code and a `page_viewed` call. Whop (`whopads`, `tagId` = the Whop account id `biz_...`) on Shopify: events are posted to Whop's conversions endpoint (`https://t.whop.tw/conversions`) the way Whop's own Shopify pixel does: `page`, `view_content`, `add_to_cart`, `purchase` (with value and currency) and the custom `shopify_search_submitted`, `shopify_checkout_started` and `shopify_payment_info_submitted`, each with Whop's `shopify:<event>:<id>` event id so a store that also runs Whop's own pixel reports each event once. The visitor id is kept in Whop's `_wuid` cookie for two years. Whop records purchases itself only for checkouts on Whop, so Shopify orders are reported here. On WordPress the widget holds the official snippet with `whop.setScope` and `whop.track(\"page\")`. Stores connected before pixel support must re-approve the Zernio app: the call then answers 409 `reconnect_required` with `details.authUrl` to send the merchant to (the Shopify account id stays the same). Platforms without an install path return 501. **WordPress** (`storeAccountId` is a connected WordPress.com or self-hosted site): Zernio adds a Custom HTML widget with the Meta pixel base code (fbevents.js, `init`, `PageView`) to a widget area of the active theme (a footer area when there is one, else the first active area; pass `sidebarId` to choose), then reads the widget back to confirm WordPress kept the `<script>` tag. The widget carries a Zernio marker, so the call is idempotent per pixel: repeating it updates or moves the same widget, and pixel code the site owner pasted by hand is never touched. Several pixels can run side by side (one widget each). When the site cannot run the pixel, nothing is left behind and the call answers 422 `tracking_tag_install_blocked` with `details.reason`: - `insufficient_permissions`: the connected user lacks `edit_theme_options` (needs Administrator). - `scripts_stripped`: WordPress removed the script (the user lacks `unfiltered_html`, e.g. a multisite admin who is not a Super Admin, or `DISALLOW_UNFILTERED_HTML` is set). - `wordpress_com_plan`: a WordPress.com plan that strips scripts (plans without plugins). - `no_widget_areas`: the theme has no widget areas (block themes such as Twenty Twenty-Five). - `widgets_api_unavailable`: no widgets REST API (WordPress older than 5.8, or disabled). The `error` message names the manual alternative (Meta's official WordPress plugin). With `verifyHomepage` (default true) the homepage is fetched afterwards and `homepageCheck` says whether the pixel is visible; `not_found` can be a stale page cache, the widget read-back is authoritative. **LinkedIn** (`linkedinads`): Shopify sends every page view to the Insight Tag, plus each store event that has an enabled event-specific Insight Tag conversion rule of the matching type (view_content = VIEW_CONTENT, add_to_cart = ADD_TO_CART, search = SEARCH, initiate_checkout = START_CHECKOUT, add_payment_info = ADD_BILLING_INFO, purchase = PURCHASE). Each conversion carries the event id; Purchase uses `shopify_order_{orderId}`, so a Conversions API event sent to a separate CONVERSIONS_API rule with that `eventId` is deduplicated by LinkedIn. Conversions API rules cannot be fired from a page, and no rule is created for you. The `li_fat_id` click id is read from the landing URL and kept in a first-party cookie for 30 days. WordPress gets LinkedIn's base code, which records page views. **Pinterest (platform `pinterestads`)**: Shopify sends `pagevisit`, `viewcontent`, `addtocart`, `search`, `initiatecheckout`, `addpaymentinfo` and `checkout` to the tag, each with `event_id` (Purchase: `shopify_order_{orderId}`, for dedup with the Pinterest Conversions API), value, currency, order quantity and line items, plus the `epik` click id kept in the `_epik` cookie. WordPress gets Pinterest's base code (core.js, `load`, `page`) with a `pagevisit` event; the manual fallback is the official Pinterest for WooCommerce plugin (WooCommerce stores).
|
|
796
796
|
# @param account_id [String]
|
|
797
797
|
# @param tag_id [String] Tag id (`TrackingTag.id`).
|
|
798
798
|
# @param install_tracking_tag_on_store_request [InstallTrackingTagOnStoreRequest]
|
|
@@ -299,7 +299,7 @@ module Zernio
|
|
|
299
299
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
300
300
|
return false if @_id.nil?
|
|
301
301
|
return false if @platform.nil?
|
|
302
|
-
platform_validator = EnumAttributeValidator.new('String', ["tiktok", "instagram", "facebook", "youtube", "linkedin", "twitter", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "discord", "slack", "whatsapp", "shopify", "wordpress", "linkedinads", "metaads", "pinterestads", "tiktokads", "xads", "googleads", "openaiads", "sms", "phone", "rcs"])
|
|
302
|
+
platform_validator = EnumAttributeValidator.new('String', ["tiktok", "instagram", "facebook", "youtube", "linkedin", "twitter", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "discord", "slack", "whatsapp", "shopify", "wordpress", "linkedinads", "metaads", "pinterestads", "tiktokads", "xads", "googleads", "openaiads", "sms", "phone", "rcs", "whopads"])
|
|
303
303
|
return false unless platform_validator.valid?(@platform)
|
|
304
304
|
return false if @profile_id.nil?
|
|
305
305
|
return false if @is_active.nil?
|
|
@@ -319,7 +319,7 @@ module Zernio
|
|
|
319
319
|
# Custom attribute writer method checking allowed values (enum).
|
|
320
320
|
# @param [Object] platform Object to be assigned
|
|
321
321
|
def platform=(platform)
|
|
322
|
-
validator = EnumAttributeValidator.new('String', ["tiktok", "instagram", "facebook", "youtube", "linkedin", "twitter", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "discord", "slack", "whatsapp", "shopify", "wordpress", "linkedinads", "metaads", "pinterestads", "tiktokads", "xads", "googleads", "openaiads", "sms", "phone", "rcs"])
|
|
322
|
+
validator = EnumAttributeValidator.new('String', ["tiktok", "instagram", "facebook", "youtube", "linkedin", "twitter", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "discord", "slack", "whatsapp", "shopify", "wordpress", "linkedinads", "metaads", "pinterestads", "tiktokads", "xads", "googleads", "openaiads", "sms", "phone", "rcs", "whopads"])
|
|
323
323
|
unless validator.valid?(platform)
|
|
324
324
|
fail ArgumentError, "invalid value for \"platform\", must be one of #{validator.allowable_values}."
|
|
325
325
|
end
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.223.0
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
class ConnectWhopAdsCredentials200Response < ApiModelBase
|
|
18
|
+
# The Zernio account id (platform `whopads`) to use as `{accountId}` on the tracking-tags routes.
|
|
19
|
+
attr_accessor :account_id
|
|
20
|
+
|
|
21
|
+
# The Whop account id (`biz_...`), which is also the tracking tag id.
|
|
22
|
+
attr_accessor :whop_account_id
|
|
23
|
+
|
|
24
|
+
attr_accessor :account_name
|
|
25
|
+
|
|
26
|
+
attr_accessor :redirect_url
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'account_id' => :'accountId',
|
|
32
|
+
:'whop_account_id' => :'whopAccountId',
|
|
33
|
+
:'account_name' => :'accountName',
|
|
34
|
+
:'redirect_url' => :'redirectUrl'
|
|
35
|
+
}
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Returns attribute mapping this model knows about
|
|
39
|
+
def self.acceptable_attribute_map
|
|
40
|
+
attribute_map
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Returns all the JSON keys this model knows about
|
|
44
|
+
def self.acceptable_attributes
|
|
45
|
+
acceptable_attribute_map.values
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Attribute type mapping.
|
|
49
|
+
def self.openapi_types
|
|
50
|
+
{
|
|
51
|
+
:'account_id' => :'String',
|
|
52
|
+
:'whop_account_id' => :'String',
|
|
53
|
+
:'account_name' => :'String',
|
|
54
|
+
:'redirect_url' => :'String'
|
|
55
|
+
}
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# List of attributes with nullable: true
|
|
59
|
+
def self.openapi_nullable
|
|
60
|
+
Set.new([
|
|
61
|
+
])
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Initializes the object
|
|
65
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
66
|
+
def initialize(attributes = {})
|
|
67
|
+
if (!attributes.is_a?(Hash))
|
|
68
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::ConnectWhopAdsCredentials200Response` initialize method"
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
72
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
73
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
74
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
75
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::ConnectWhopAdsCredentials200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
76
|
+
end
|
|
77
|
+
h[k.to_sym] = v
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if attributes.key?(:'account_id')
|
|
81
|
+
self.account_id = attributes[:'account_id']
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'whop_account_id')
|
|
85
|
+
self.whop_account_id = attributes[:'whop_account_id']
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'account_name')
|
|
89
|
+
self.account_name = attributes[:'account_name']
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'redirect_url')
|
|
93
|
+
self.redirect_url = attributes[:'redirect_url']
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
98
|
+
# @return Array for valid properties with the reasons
|
|
99
|
+
def list_invalid_properties
|
|
100
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
101
|
+
invalid_properties = Array.new
|
|
102
|
+
invalid_properties
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Check to see if the all the properties in the model are valid
|
|
106
|
+
# @return true if the model is valid
|
|
107
|
+
def valid?
|
|
108
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
109
|
+
true
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Checks equality by comparing each attribute.
|
|
113
|
+
# @param [Object] Object to be compared
|
|
114
|
+
def ==(o)
|
|
115
|
+
return true if self.equal?(o)
|
|
116
|
+
self.class == o.class &&
|
|
117
|
+
account_id == o.account_id &&
|
|
118
|
+
whop_account_id == o.whop_account_id &&
|
|
119
|
+
account_name == o.account_name &&
|
|
120
|
+
redirect_url == o.redirect_url
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# @see the `==` method
|
|
124
|
+
# @param [Object] Object to be compared
|
|
125
|
+
def eql?(o)
|
|
126
|
+
self == o
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Calculates hash code according to all attributes.
|
|
130
|
+
# @return [Integer] Hash code
|
|
131
|
+
def hash
|
|
132
|
+
[account_id, whop_account_id, account_name, redirect_url].hash
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Builds the object from hash
|
|
136
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
137
|
+
# @return [Object] Returns the model itself
|
|
138
|
+
def self.build_from_hash(attributes)
|
|
139
|
+
return nil unless attributes.is_a?(Hash)
|
|
140
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
141
|
+
transformed_hash = {}
|
|
142
|
+
openapi_types.each_pair do |key, type|
|
|
143
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
144
|
+
transformed_hash["#{key}"] = nil
|
|
145
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
146
|
+
# check to ensure the input is an array given that the attribute
|
|
147
|
+
# is documented as an array but the input is not
|
|
148
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
149
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
150
|
+
end
|
|
151
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
152
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
new(transformed_hash)
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Returns the object in the form of hash
|
|
159
|
+
# @return [Hash] Returns the object in the form of hash
|
|
160
|
+
def to_hash
|
|
161
|
+
hash = {}
|
|
162
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
163
|
+
value = self.send(attr)
|
|
164
|
+
if value.nil?
|
|
165
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
166
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
hash[param] = _to_hash(value)
|
|
170
|
+
end
|
|
171
|
+
hash
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
end
|