I believe it would be a similar process to this video but for step one you would instead embed custom code at the relevant place on the page.
For this example when adding the link (step two) you would put #link1 as a regular link.
As the video says this only works after the site has been published.