Content

JS Changing Title & Breadcrumbs and More

The following changes the page title to "Publications" and changes the breadcrumbs to "Home / Resource Library" w/ their corresponding links: 

<script type="text/javascript">

var PageTitle = 'Publications' ;

//DO NOT EDIT BELOW THIS
document.getElementById("page-title").innerHTML = PageTitle;

var txt = document.getElementsByClassName("breadcrumb")[0].innerHTML;
var txt1 = '<a href=\"https://hwpi.harvard.edu/govlabs/home">Home</a>' + '<span> / </span>' + '<a href=\"https://hwpi.harvard.edu/govlabs/resource-library">Resource Library...
Read more about JS Changing Title & Breadcrumbs and More

Javascript Redirect

  • Add the following code to an Embed Media widget
  • Swap out link that want it to redirect to
    • make sure to add the following GA query string so Joe can track it: ?utm_source=os&utm_campaign=redirect_analysis
  • Get rid of any widgets in the layout on the site
  • Paste in all sections of site at top of layout
  • mark in spreadsheet so can track redirects: https://docs.google.com/spreadsheets/d/1lykJfpWp-eEcAcrPzYKWskpxRc9oHyxpil8aEUmXRUs/edit?usp=drive_web&ouid=...
Read more about Javascript Redirect