Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Nov 2, 2018

Conversation

lord2800
Copy link
Contributor

@lord2800 lord2800 commented Nov 2, 2018

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
Copy link

bigbot commented Nov 2, 2018

Autotagging @bigcommerce/storefront-team @davidchin

Copy link
Contributor

@Ubersmake Ubersmake left a comment

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.

templates/pages/blog.html Show resolved Hide resolved
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
Copy link
Contributor Author

lord2800 commented Nov 2, 2018

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
Copy link
Contributor

bc-ranji commented Nov 2, 2018

thanks for putting together the awk script @lord2800

@fthobe
Copy link

fthobe commented Jun 28, 2019

@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