Skip to content

Commit

Permalink
Merge pull request #1155 from mjschock/STRF-4282
Browse files Browse the repository at this point in the history
STRF-4282 - Add support in Cornerstone to consume AMP ID
  • Loading branch information
mjschock authored Jan 31, 2018
2 parents 2c640cb + 7e27dd1 commit d3e5b36
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 16 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Draft
- Fix logo not loading on order confirmation page [#1159](https://github.com/bigcommerce/cornerstone/pull/1159)
- Add support in Cornerstone to consume AMP ID [#1155](https://github.com/bigcommerce/cornerstone/pull/1155)

## 1.12.1 (2018-01-23)
- Fix event delegation error [#1151](https://github.com/bigcommerce/cornerstone/pull/1151)
Expand Down
1 change: 0 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"Firefox ESR"
],
"settings": {
"amp_analytics_id": "",
"homepage_new_products_count": 12,
"homepage_featured_products_count": 8,
"homepage_top_products_count": 8,
Expand Down
10 changes: 0 additions & 10 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2577,15 +2577,5 @@
"id": "optimizedCheckout-loadingToaster-textColor"
}
]
},
{
"name": "Google AMP (beta)",
"settings": [
{
"type": "text",
"label": "AMP Analytics ID",
"id": "amp_analytics_id"
}
]
}
]
2 changes: 1 addition & 1 deletion templates/layout/amp.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{{{snippet 'htmlhead'}}}
<script async custom-element="amp-form" src="https://cdn.ampproject.org/v0/amp-form-0.1.js"></script>
<script async custom-element="amp-sidebar" src="https://cdn.ampproject.org/v0/amp-sidebar-0.1.js"></script>
{{#if theme_settings.amp_analytics_id}}
{{#if settings.amp_analytics_id}}
<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>
{{/if}}
{{#block "amp-scripts"}}{{/block}}
Expand Down
4 changes: 2 additions & 2 deletions templates/pages/amp/category.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ <h1 class="categoryView-title">
</main>
{{> components/amp/category/subcategories}}
{{> components/amp/common/footer }}
{{#if theme_settings.amp_analytics_id}}
{{#if settings.amp_analytics_id}}
<amp-analytics type="googleanalytics">
<script type="application/json">
{
"vars": {
"account": "{{theme_settings.amp_analytics_id}}"
"account": "{{settings.amp_analytics_id}}"
},
"extraUrlParams": {
"cd1": "{{page_type}}",
Expand Down
4 changes: 2 additions & 2 deletions templates/pages/amp/product.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
<div itemscope itemtype="http://schema.org/Product">
{{> components/amp/products/product-view schema=true}}
</div>
{{#if theme_settings.amp_analytics_id}}
{{#if settings.amp_analytics_id}}
<amp-analytics type="googleanalytics">
<script type="application/json">
{
"vars": {
"account": "{{theme_settings.amp_analytics_id}}"
"account": "{{settings.amp_analytics_id}}"
},
"extraUrlParams": {
"cd1": "{{page_type}}",
Expand Down

0 comments on commit d3e5b36

Please sign in to comment.