How to implement this code? (About linking to a tab on a different page)

So I’ve found this post as a solution:

"Selecting the tab on another page would require a custom URL parameter. Here’s an example script that you can append to the </body> code section:

var Webflow = Webflow || [];
Webflow.push(function () {
  var tabName = getParam('tab');
  if (!tabName) return;

  $('.' + tabName).triggerHandler('click');

  function getParam(name) {
    name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
    var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
      results = regex.exec(;
    return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));

Once in place, you would then need to link to your page with a custom url:

/contact?tab=target-tab-link for a ‘contact’ page
/?tab=target-tab-link for the home page

Note: This will only work once the page is published or exported. (not in preview mode)

Hope that helps!"

But I know nothing about code

  1. Where do I put the code, home page or target page
  2. What parts of the code should I rename
  3. How shouly I use the URL’s provided?

I’ve got 2 buttons on a home page - One of them needs to lead to a “web-design” tab and the other to “graphic-design” tab
I’ve got ID’s set up for those 2 tabs - Tabs are located on “services” page
Site is published