File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
themes/arm-design-system-hugo-theme Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 3737 <!-- Title of _index.md always top left -->
3838 {{ with .Site.GetPage $thisdir}}
3939 < h6 id ="learning-path-title " class ="u-margin-top-1/2 " style ="font-size:1em; font-weight: normal; "> {{ .Params.Title }}</ h6 >
40+ <!-- Author name hidden but availible for analytics -->
41+ < div hidden id ="learning-path-author " data-author ="{{.Params.author_primary}} "> </ div >
4042 {{ end }}
4143
4244
Original file line number Diff line number Diff line change @@ -292,13 +292,13 @@ function attachPageFindSearchTracker() {
292292 let lp_step = document . getElementById ( 'learning-path-step-active' ) . innerText . trim ( ) ;
293293 let lp_step_num = document . getElementById ( 'learning-path-step-active' ) . getAttribute ( 'data-step-num' ) ;
294294 let lp_category = current_path . split ( '/' ) [ 2 ] ;
295+ let lp_author = document . getElementById ( 'learning-path-author' ) . getAttribute ( 'data-author' ) . trim ( ) ;
295296
296297 // specific to intro page only;
297298 if ( document . getElementById ( 'skill-level' ) ) {
298299 let lp_skill_level = document . getElementById ( 'skill-level' ) . innerText . trim ( ) ;
299300 let lp_reading_time = document . getElementById ( 'reading-time' ) . innerText . trim ( ) ;
300301 let lp_last_updated = document . getElementById ( 'last-updated' ) . innerText . trim ( ) ;
301- let lp_author = document . getElementById ( 'author' ) . innerText . trim ( ) ;
302302 let lp_tag_elements = document . querySelectorAll ( '#tags-for-content ads-tag' ) ;
303303 let lp_tags = ''
304304 for ( let ele of lp_tag_elements ) {
@@ -329,7 +329,8 @@ function attachPageFindSearchTracker() {
329329 learningPathName : lp_title ,
330330 learningTabName : lp_step ,
331331 pageNumber : "page " + lp_step_num ,
332- learningPathCategory : lp_category
332+ learningPathCategory : lp_category ,
333+ learningPathAuthor : lp_author
333334 }
334335 } ;
335336 }
You can’t perform that action at this time.
0 commit comments