Question

Typeform goal conversion url is not correctly shown on Google Analytics

  • 13 April 2023
  • 8 replies
  • 92 views

Userlevel 1

Hi!

I am currently facing an issue where the actual landing page of my website is not being displayed on Google Analytics for Typeform goal conversions. Previously, the GA report for Behavior > Site Content > Landing Pages displayed the correct landing page after a Typeform goal conversion up until January 27th. However, now it only shows "/to/typeformID/..." as the landing page where the goal was converted. I am looking for a solution to display the website's landing page after a Typeform goal conversion instead of the "/to/typeformID/..." page. Is there a way to resolve this issue?

 

 

 


8 replies

Userlevel 7
Badge +5

Hi @rick.harington Could you send the URL where you have the form embedded so we can take a look at the code there? Thanks!

Userlevel 1

@Liz thank you for response. Here is the URL jasonl.com.au. Please see the attached screenshot 

 

Userlevel 7
Badge +5

@mathio do you happen to know if the javascript added to the typeform embed on this page would cause any issues with Google Analytics? 

Userlevel 7
Badge +5

The embed code should not affect this. I think there was migration to GA version 4 in January. I will ask the team responsible for the migration if they might know about this.

Userlevel 1

@mathio Have you inquired with the team regarding this matter? Is it an intentional change for GA version 4 or will it be resolved?

Userlevel 7
Badge +5

Hi @rick.harington I asked them to follow up with you here.

Userlevel 1

hi @rick.harington 

 

Following up on @mathio I am looking into the issue you exposed.

In fact, at Typeform, we migrated from the legacy GA to the new gtag (supporting GA4) function. Although the change is minimal on our side, the usage of gtag implies the usage of completely different products on google’s side.

I did some tests with different setups / configurations and by tomorrow I will get the final data on google analytics and will let you know if there is anything we can do to improve your conversions

Userlevel 1

hi @rick.harington I got the results from the tests I did. 

In fact the embedded typeform will always display the "/to/typeformID/..." page. This occurs because the iframe with the typeform should not have access to the data outside its domain (outside the iframe) – I guess that something related to this changed on google when migrating from ga to gtag.You could ask google on this to see if they have any relevant information

Nonetheless, you can do a workaround by putting the script for google analytics on your main page and adding the `data-tf-share-ga-instance`  attribute to your embed. would that work for you?

the embed script would be something like:

 

<head> 
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-227234524-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-XXXXXXXX-X');
</script>
</head>
<body>
<button
data-tf-popup="YOUR_FORM_ID"
data-tf-opacity="100"
data-tf-size="100"
data-tf-iframe-props="title=My typeform"
data-tf-transitive-search-params
data-tf-share-ga-instance
data-tf-medium="snippet"
style="
all: unset;
font-family: Helvetica, Arial, sans-serif;
display: inline-block;
max-width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
background-color: #0445af;
color: #fff;
font-size: 20px;
border-radius: 25px;
padding: 0 33px;
font-weight: bold;
height: 50px;
cursor: pointer;
line-height: 50px;
text-align: center;
margin: 0;
text-decoration: none;
"
>
Try me!
</button>
<script src="//embed.typeform.com/next/embed.js"></script>
</body>

 

Plz let me know if this worked for you

Reply