Skip to content

PROJECT-2272: Add support for declarative data tag analytics#1377

Merged
Ubersmake merged 1 commit into
bigcommerce:masterfrom
lord2800:CP-3028
Nov 2, 2018
Merged

PROJECT-2272: Add support for declarative data tag analytics#1377
Ubersmake merged 1 commit into
bigcommerce:masterfrom
lord2800:CP-3028

Conversation

@lord2800

@lord2800 lord2800 commented Nov 2, 2018

Copy link
Copy Markdown
Contributor

What?

Add support for declarative data tag analytics events.

Tickets / Documentation

  • CP-3026
  • CP-3027
  • CP-3028
  • CP-3033
  • CP-3055
  • CP-3056
  • CP-3181
  • CP-3273
  • CP-3275
  • CP-3872
  • CP-3936
  • CP-3957
  • CP-3960
  • CP-3971
  • CP-4036
  • CP-4038
  • CP-4042

Probably others as well.

@Ubersmake @bigcommerce/cp-dt @bigcommerce/storefront-team

@bigbot

bigbot commented Nov 2, 2018

Copy link
Copy Markdown

Autotagging @bigcommerce/storefront-team @davidchin

@Ubersmake Ubersmake left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. Question on blog.html, though.

Comment thread templates/pages/blog.html
Co-authored-by: ranjitha venkataramani <ranjitha.v@bigcommerce.com>
Co-authored-by: Senthil Krishnasamy <senthil.krishnasamy@bigcommerce.com>
Co-authored-by: Ryan Greenberg <hawk1138@gmail.com>
Co-authored-by: Adam Bilsing <adambilsing@gmail.com>
@lord2800

lord2800 commented Nov 2, 2018

Copy link
Copy Markdown
Contributor Author

Components/pages passing settings:

templates/pages/brand.html
templates/pages/category.html
templates/pages/product.html
templates/pages/search.html
templates/pages/amp/category.html
templates/pages/amp/product.html
templates/components/cart/preview.html
templates/components/products/carousel.html
templates/components/products/featured.html
templates/components/products/grid.html
templates/components/products/quick-view.html
templates/components/products/product-view.html
templates/components/products/related.html
templates/components/products/new.html
templates/components/products/tabs.html
templates/components/products/top.html
templates/components/search/quick-results.html
templates/components/amp/products/list.html
templates/components/amp/products/grid.html

Calls those pages are making:

templates/pages/brand.html:            {{> components/brand/product-listing settings=../settings}}
templates/pages/category.html:            {{> components/category/product-listing settings=../settings}}
templates/pages/product.html:        {{> components/products/product-view settings=../settings schema=true  }}
templates/pages/search.html:            {{> components/search/product-listing settings=../settings}}
templates/pages/amp/category.html:    {{> components/amp/common/footer settings=../settings}}
templates/pages/amp/product.html:        {{> components/amp/products/product-view schema=true settings=../settings}}
templates/pages/amp/product.html:    {{> components/amp/common/footer settings=../settings}}
templates/components/products/carousel.html:            {{> components/products/card settings=../settings theme_settings=../theme_settings customer=../customer event="list" position=(add @index 1)}}
templates/components/search/quick-results.html:                {{> components/products/card settings=../settings alternate=true show_compare=../show_compare theme_settings=../theme_settings customer=../customer event="list" position=(add @index 1)}}
templates/components/products/featured.html:                {{>components/products/card settings=../settings theme_settings=../theme_settings customer=../customer event="list" position=(add @index 1)}}
templates/components/products/new.html:    {{> components/products/carousel settings=../settings products=products list="New Products"}}
templates/components/products/grid.html:            {{>components/products/card settings=../settings show_compare=../show_compare show_rating=../settings.show_product_rating theme_settings=../theme_settings customer=../customer event=../event position=(add @index 1)}}
templates/components/products/quick-view.html:    {{> components/products/product-view settings=../settings schema=false}}
templates/components/products/related.html:            {{>components/products/card settings=../settings theme_settings=../theme_settings event="list" position=(add @index 1)}}
templates/components/products/tabs.html:            {{> components/products/carousel settings=../settings products=product.similar_by_views columns=6 list="Customers Also Viewed"}}
templates/components/products/top.html:    {{>components/products/card settings=../settings theme_settings=../theme_settings customer=../customer event="list" position=(add @index 1)}}
templates/components/cart/preview.html:                        {{> components/products/card settings=../settings hide_product_quick_view=true theme_settings=../theme_settings}}
templates/components/products/product-view.html:            {{> components/products/description  settings=../settings}}
templates/components/amp/products/grid.html:        {{>components/amp/products/card  settings=../settings show_rating=../settings.show_product_rating theme_settings=../theme_settings customer=../customer}}
templates/components/amp/products/list.html:	        {{>components/amp/products/list-item settings=../settings show_rating=../settings.show_product_rating theme_settings=../theme_settings}}

Of the list of templates passing settings, templates actually using settings:

templates/components/brand/product-listing.html
templates/components/category/product-listing.html
templates/components/products/product-view.html
templates/components/search/product-listing.html
templates/components/amp/common/footer.html
templates/components/amp/products/product-view.html
templates/components/amp/common/footer.html
templates/components/products/card.html
templates/components/products/card.html
templates/components/products/card.html
templates/components/products/card.html
templates/components/products/description.html
templates/components/products/product-view.html
templates/components/products/card.html
templates/components/products/card.html
templates/components/products/card.html
templates/components/amp/products/list-item.html

(data gathered using: grep -l -C0 '\bsettings=' ., grep -C0 '\bsettings=' . | awk -F '{{>' '{print $1 "{{>" $2}', and FILES=$(grep -C0 '\bsettings=' . | awk -F '{{>' '{print $2}' | awk '{print $1}'); for template in $FILES; do grep -l '\bsettings\..+' "templates/$template.html"; done)

@Ubersmake Ubersmake merged commit 33fdfb8 into bigcommerce:master Nov 2, 2018
@bc-ranji

bc-ranji commented Nov 2, 2018

Copy link
Copy Markdown
Contributor

thanks for putting together the awk script @lord2800

@fthobe

fthobe commented Jun 28, 2019

Copy link
Copy Markdown

@Ubersmake this implementation is incorrect as product impressions are sent irregardless of the visibility of the product.

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.

5 participants