Skip to content

Commit

Permalink
✨ New feature - [ Project TribooAnalytics ] Implement the support for…
Browse files Browse the repository at this point in the history
… the TribooAnalytics into amp-analytics (#39907)

* Add the TribooAnalytics support

* Add missing files for TribooAnalytics vendor support

* Remove a file that was added by mistake.
  • Loading branch information
TribooAnalytics authored Apr 5, 2024
1 parent 0dc822a commit c9c3db9
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 0 deletions.
14 changes: 14 additions & 0 deletions examples/analytics-vendors.amp.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
<option>top100</option>
<option>topmailru</option>
<option>treasuredata</option>
<option>tribooanalytics</option>
<option>umenganalytics</option>
<option>upscore</option>
<option>vponanalytics</option>
Expand Down Expand Up @@ -1967,6 +1968,19 @@
</amp-analytics>
<!-- End Treasure Data example -->

<!-- tribooanalytics example -->
<amp-analytics type="tribooanalytics" id="tribooanalytics">
<script type="application/json">
{
"vars": {
"account": "amptest",
"page": "Home page"
}
}
</script>
</amp-analytics>
<!-- End tribooanalytics Example -->

<!-- Webtrekk tracking -->
<amp-analytics type="webtrekk" id="webtrekk">
<script type="application/json">
Expand Down
10 changes: 10 additions & 0 deletions extensions/amp-analytics/0.1/test/vendor-requests.json
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,16 @@
"pageview": "https://in.treasuredata.com/postback/v3/event/!database/events?td_write_key=!writeKey&td_global_id=td_global_id&td_client_id=_client_id(_td)_&td_charset=_document_charset_&td_language=_browser_language_&td_color=_screen_color_depth_&td_screen=_screen_width_x_scroll_height_&td_viewport=_available_screen_width_x_available_screen_height_&td_title=_title_&td_url=_source_url_&td_user_agent=_user_agent_&td_host=_source_host_&td_path=_source_path_&td_referrer=_document_referrer_&td_ip=td_ip",
"event": "https://in.treasuredata.com/postback/v3/event/!database/events?td_write_key=!writeKey&td_global_id=td_global_id&td_client_id=_client_id(_td)_&td_charset=_document_charset_&td_language=_browser_language_&td_color=_screen_color_depth_&td_screen=_screen_width_x_scroll_height_&td_viewport=_available_screen_width_x_available_screen_height_&td_title=_title_&td_url=_source_url_&td_user_agent=_user_agent_&td_host=_source_host_&td_path=_source_path_&td_referrer=_document_referrer_&td_ip=td_ip"
},
"tribooanalytics": {
"base": "https://amp.tribooanalytics.com/cgi-bin/ampta.cgi",
"commpar": "AMP=1&RM=_random_&USER=!account&PAG=!page&HR=_source_url_&REFER=_document_referrer_&RES=_screen_width_X_screen_height_&COLOR=_screen_color_depth_&CID=_client_id(AMP_CID)_&PAGID=_page_view_id_&TITL=_title_&RQC=1",
"pagepar": "&VIE=_viewer_&PLT=_page_load_time_",
"eventpar": "&SSXL=1",
"linkpar": "&LINK=!outboundLink",
"pageview": "https://amp.tribooanalytics.com/cgi-bin/ampta.cgi?AMP=1&RM=_random_&USER=!account&PAG=!page&HR=_source_url_&REFER=_document_referrer_&RES=_screen_width_X_screen_height_&COLOR=_screen_color_depth_&CID=_client_id(AMP_CID)_&PAGID=_page_view_id_&TITL=_title_&RQC=1&VIE=_viewer_&PLT=_page_load_time_",
"event": "https://amp.tribooanalytics.com/cgi-bin/ampta.cgi?AMP=1&RM=_random_&USER=!account&PAG=!page&HR=_source_url_&REFER=_document_referrer_&RES=_screen_width_X_screen_height_&COLOR=_screen_color_depth_&CID=_client_id(AMP_CID)_&PAGID=_page_view_id_&TITL=_title_&RQC=1&SSXL=1",
"link": "https://amp.tribooanalytics.com/cgi-bin/ampta.cgi?AMP=1&RM=_random_&USER=!account&PAG=!page&HR=_source_url_&REFER=_document_referrer_&RES=_screen_width_X_screen_height_&COLOR=_screen_color_depth_&CID=_client_id(AMP_CID)_&PAGID=_page_view_id_&TITL=_title_&RQC=1&LINK=!outboundLink"
},
"umenganalytics": {
"base": "https://b.cnzz.com/utrack?&_siteid=!siteid&_distinct_id=_client_id(umeng_amp_id)_&_t=_timestamp_&_s=google&_b=web&_r=_external_referrer_&_h=_screen_height_&_w=_screen_width_&_ivt=!initial_view_time",
"pageview": "https://b.cnzz.com/utrack?&_siteid=!siteid&_distinct_id=_client_id(umeng_amp_id)_&_t=_timestamp_&_s=google&_b=web&_r=_external_referrer_&_h=_screen_height_&_w=_screen_width_&_ivt=!initial_view_time&_ename=$w_page_view&_eprops=!eventProps",
Expand Down
23 changes: 23 additions & 0 deletions extensions/amp-analytics/0.1/vendors/tribooanalytics.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"transport": {
"beacon": false,
"xhrpost": false,
"image": true
},
"requests": {
"base": "https://amp.tribooanalytics.com/cgi-bin/ampta.cgi",
"commpar": "AMP=1&RM=${random}&USER=${account}&PAG=${page}&HR=${sourceUrl}&REFER=${documentReferrer}&RES=${screenWidth}X${screenHeight}&COLOR=${screenColorDepth}&CID=${clientId(AMP_CID)}&PAGID=${pageViewId}&TITL=${title}&RQC=${requestCount}",
"pagepar": "&VIE=${viewer}&PLT=${pageLoadTime}",
"eventpar": "&SSXL=1",
"linkpar": "&LINK=${outboundLink}",
"pageview": "${base}?${commpar}${pagepar}",
"event": "${base}?${commpar}${eventpar}",
"link": "${base}?${commpar}${linkpar}"
},
"triggers": {
"pageview": {
"on": "visible",
"request": "pageview"
}
}
}
4 changes: 4 additions & 0 deletions extensions/amp-analytics/analytics-vendors-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,10 @@ Type attribute value: `treasuredata`

Adds support for Treasure Data. Configuration details can be found at [docs.treasuredata.com](https://docs.treasuredata.com/display/public/INT/Google+Accelerated+Mobile+Pages+AMP).

### Triboo Data Analytics

Type attribute value: `tribooanalytics`

### Umeng+ Analytics

Type attribute value: `umenganalytics`
Expand Down

0 comments on commit c9c3db9

Please sign in to comment.