aemsites / hubblehomes-com

AEM Sites project for hubblehomes.com on Edge Delivery
Apache License 2.0
0 stars 0 forks source link

[ON HOLD] Injecting the datalayer object onto the page. #262

Closed bhellema closed 2 months ago

bhellema commented 3 months ago

Fix #165

Test URLs:

aem-code-sync[bot] commented 3 months ago

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed. In case there are problems, just click a checkbox below to rerun the respective action.

Commits * [f82e06f](https://github.com/aemsites/hubblehomes-com/commit/f82e06f623c93acfc5eb46e7cda1663f61a4bc57) :white_check_mark: (latest) * [ade45f5](https://github.com/aemsites/hubblehomes-com/commit/ade45f50a5cd76a7db3c33431f007f652dd182fa) :white_check_mark:
aem-code-sync[bot] commented 3 months ago
Page Scores Audits Google
/ PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
samuelopra commented 3 months ago

Just something to call out, for dataLayer in Nampa, seems that the pageType is "Search Results" https://www.hubblehomes.com/new-homes/idaho/boise-metro/nampa

dataLayer = [{  
    'pageType'  : 'Search Results',
    'city'      : 'Nampa',
    'state'     : 'Idaho',  
    'region'    : 'Boise Metro',
    'community' : '',
    'model'     : '',
    'spec'      : ''
}];     

where in this implementation it's home. First letters are also capitalized: https://issue-165--hubblehomes-com--aemsites.hlx.page/new-homes/idaho/boise-metro/nampa

dataLayer = [{
  'pageType': 'home',
  'city': 'nampa',
  'state': 'idaho',
  'region': 'boise metro',
  'community': '',
  'model': '',
  'spec': ''
}];
bhellema commented 3 months ago

Search Results

I saw that too and it made no sense that the page was called Search Results as it provides no context. I'm going to have to walk through the values they have with Nate and see what makes sense.

Good catch on the case differences. I intentionally toLowerCase everything for consistency as some of their results were all over the place. Again, I'll chat with Nate to see what he would like to see.

bhellema commented 3 months ago

where in this implementation it's home. First letters are also capitalized: https://issue-165--hubblehomes-com--aemsites.hlx.page/new-homes/idaho/boise-metro/nampa

dataLayer = [{
  'pageType': 'home',
  'city': 'nampa',
  'state': 'idaho',
  'region': 'boise metro',
  'community': '',
  'model': '',
  'spec': ''
}];

You did find a bug! The pageType should not be home for this example. I'll have to see why it's not resolving correctly.

bhellema commented 3 months ago

Latest commit fixes issue with page type. Also fixed double dataLayer entry on 404 page.

bhellema commented 2 months ago

handled in https://github.com/aemsites/hubblehomes-com/pull/354