AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
3.6K members online now
3.6K members online now
Learn how to set up goals and Ecommerce tracking, verify accuracy of attribution traffic sources, and discuss funnel visualization, Multi-Channel Funnels, the Goal Flow Report, and Enhanced Ecommerce
 
Guide Me
star_border
Reply

How to implement and track Goal/Event for a site hosted on Launchrock.com?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi everyone -

 

I am quite new to the world of tags and analytics, and have been searching a lot for the solution before I decided to use the forum... if anyone can help, I'll highly appreciate, as long as we go baby steps ;-)

 

Here is my issue: I have put together a super-simple 1-page landing page on launchrock.com to measure the interest in my product concept. so far so good. I have set up my analytics account and copy/pasted the universal analytics script in the head of my page (the launchrock functionalities allows this, as well as inserting scripts in the body section). Right now am able to read the trafic to the site, and generic behaviours of the visitors (bounce rate, time on site, number of pages and all of these good things).

 

Things go south for me when it comes to being able to measure/read details about my conversion, ie measure how many people (coming from the different channels, FB, organic, etc) do something on my site. And that something that I want to measure right now is the action of signing up in the sign up field of my site. (I will likely want to track more actions later on, but for now only this one is of interest to me)

 

I understand I need to create a "Goal" in Analytics and define as "Event" the fact that one clicks the button "Submit" in the sign-up section of my site (after they actually share their names and email address). Am clear on that, and I have tried different things to make it work (use the "templates" suggested by analytics, import personnalized events scripts and copy them into my page...), nothing works so far. 

 

I suspect the reasons for my failure to be 1) when one signs up (= clicks "submit"), the page URL doesn't change vs the main and previous page (ie there is only 1 URL I can track, so once one has landed on my page, whatever they do I can't see/monitor) and/or 2) I have not found how/if I can edit some script into the sign-up section (I know I can insert script in the Head and Body, but I have no offer from Launchrock site to do so in the Footer which is rather where the sign-up section is). Obviously am a beginner so maybe am saying complete non-sense here... So if you end up having a look at this question, and you happen to have the solution, please help me :-) And if maybe the issue is point (1) above and the easiest way is to create a second page (like a "thank you page" after clicking submit), then please help me understand how to do this on Launchrock as it really seems to only be 1-page website templates ;-)

 

Site: http://idmeal-beta.launchrock.com

 

MANY THANKS!!!!

Aure

1 Expert replyverified_user

How to implement and track Goal/Event for a site hosted on Launchrock.com?

Top Contributor
# 2
Top Contributor

Hi,

 

Your tracking code is installed multiple times, this results in counting duplicate pageviews and messed up reports. You need to keep the universal analytics tracking code that is found in GA Admin -> Property -> Tracking Info -> Tracking Code.

 

Regarding tracking the form submissions please check the document below, about sending an event to Google Analytics when the form is submitted.

https://developers.google.com/analytics/devguides/collection/analyticsjs/sending-hits#knowing_when_t...

 

Hope this helps, let me know if you have questions.


Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

How to implement and track Goal/Event for a site hosted on Launchrock.com?

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi there Arnold -

 

Thanks a lot for looking into my silly issue.

 

First, I removed the duplicated code - I knew it was copied in the body field but did not know it was messing up the reports #dumbme...

 

Second, I looked at the interesting article - I get it that a solution seems to be to avoid the page to unload by intercepting the event via the hitcallback script.

 

The challenge now for me (again, baby steps...!) is to place this script properly in my site: I only had a very light onboarding about html/css and co, so am not familiar at all with the coding and all. And when inspecting the html code, here is what seems to show up for the sign-up section:

 

<section site-user-signup-block="" lr-multi-column-block="" id="site-block--bmqpru4zblvva2o1nyu1u8lkg" class="site-block site-block--site-user-signup  site-block--bmqpru4zblvva2o1nyu1u8lkg">
    <div class="site-block__bg-image site-block__bg-image--bmqpru4zblvva2o1nyu1u8lkg"></div>
    

    <!--
      *
      * SIGNUP FORM ON THE LEFT
      *
     -->
            <div class="container">
            <div class="row">
                <div lr-builder-render-signup-form-column-classes="" class="site-block__col-wrap col-sm-8">
                    <div lr-column="" class="site-block__col site-block__col--0">
                        <div class="site-block__col-bg-image site-block__col-bg-image--0"></div>
                        <div class="row" ng-show="!siteUser &amp;&amp; !submitting">
        <div class="col-xs-12 site-user-signup__intro">
            <p><span style="font-size: 42px;">Inscrivez-vous pour être informé du lancement!</span>
</p>
<p>Intéressé(e)? Inscrivez-vous maintenant et testez en avant-première l'application et le service id(m)eal!
</p>        </div>
    </div>

                        <div class="row" ng-show="!siteUser &amp;&amp; !submitting">
    <div class="col-xs-12">
        <form id="site-user-signup__form--bmqpru4zblvva2o1nyu1u8lkg" class="form site-user-signup__form form-horizontal site-user-signup__form--bmqpru4zblvva2o1nyu1u8lkg ng-pristine ng-invalid ng-invalid-required ng-valid-email ng-valid-pattern" name="form" ng-submit="submit()" novalidate="">
            <div class="mt-table mt-table--width-100 mt-table--align-center">
                <div class="mt-td--centered-vertical site-user-signup__col-1">

                                            <div class="site-user-signup__form-group m-lg-v form-group col-sm-6">
                            <label class="site-user-signup__label site-user-signup__label--full-name" for="site-user-signup__full-name--bmqpru4zblvva2o1nyu1u8lkg" ng-class="{validation: (form.fullName.$touched  || form.$submitted) &amp;&amp; form.fullName.$invalid }">
                                Invalid
                            </label>
                            <input id="site-user-signup__full-name--bmqpru4zblvva2o1nyu1u8lkg" class="form-control form-control__input site-user-signup__full-name site-user-signup__full-name--bmqpru4zblvva2o1nyu1u8lkg ng-pristine ng-untouched ng-invalid ng-invalid-required" ng-model="siteUserSignup.fullName" name="fullName" ng-required="true" placeholder="Full Name" aria-required="true" required="required" type="text">
                        </div>
                    
                                            <div class="site-user-signup__form-group m-lg-v form-group col-sm-6">
                            <label class="site-user-signup__label site-user-signup__label--email" for="site-user-signup__email--bmqpru4zblvva2o1nyu1u8lkg" ng-class="{validation: (form.email.$touched  || form.$submitted) &amp;&amp; form.email.$invalid }">
                                Invalid
                            </label>
                            <input id="site-user-signup__email--bmqpru4zblvva2o1nyu1u8lkg" class="form-control form-control__input site-user-signup__email site-user-signup__email--bmqpru4zblvva2o1nyu1u8lkg ng-pristine ng-untouched ng-valid-email ng-invalid ng-invalid-required ng-valid-pattern" ng-model="siteUserSignup.email" ng-required="true" ng-pattern="/^[a-zA-Z0-9+-_]+(\.[_a-zA-Z0-9+]+)*@[a-zA-Z0-9+-_]+(\.[a-zA-Z0-9+-_]+)*(\.[a-zA-Z]+)$/" name="email" placeholder="Email" aria-required="true" required="required" type="email">
                        </div>
                    
                    
                </div>

                <div class="mt-td--centered-vertical site-user-signup__col-2">

                    <div class="site-user-signup__form-group m-lg-v text-center">
                        <button id="site-user-signup__submit--bmqpru4zblvva2o1nyu1u8lkg" type="submit" class="btn btn-default submit site-user-signup__submit site-user-signup__submit--bmqpru4zblvva2o1nyu1u8lkg"><span>Submit</span></button>
                    </div>

                </div>
            </div>
        </form>
    </div>
</div>
                        <div class="row ng-hide" ng-show="siteUser != null || submitting">
    <div class="col-xs-12">
        <h1 style="text-align: center;">Thank You for Signing Up!</h1><p style="text-align: center;">Please share with your friends, family, and co-workers.</p>                    <!-- ngIf: shareLink -->
            <!-- ngIf: !shareLink --><div class="social-share ng-scope" ng-if="!shareLink">
                <div>Loading...</div>
            </div><!-- end ngIf: !shareLink -->
            </div>
</div>
                    </div>
                </div>
                <div lr-builder-render-signup-form-column-classes="" class="site-block__col-wrap col-sm-4">
                    <div lr-column="" class="site-block__col site-block__col--1">
                        <div class="site-block__col-bg-image site-block__col-bg-image--1"></div>
                        <div class="site-block__content">
                                                    </div>
                    </div>
                </div>
            </div>
        </div>
 

----

If you could give me another round of useful advice, it'd be awesome :-)

Thanks a bunch!!

Aure

Re: How to implement and track Goal/Event for a site hosted on Launchrock.com?

Top Contributor
# 4
Top Contributor

Hi,

 

Please try to add the code below before the closing body tag:

<script>
	var form = document.getElementById('site-user-signup__form--bmqpru4zblvva2o1nyu1u8lkg');
	form.addEventListener('submit', function(event) {
	  event.preventDefault();
	  ga('send', 'event', 'Signup Form', 'submit', {
		hitCallback: function() {
		  form.submit();
		}
	  });
	});
</script>

Let me know if it works.


Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

How to implement and track Goal/Event for a site hosted on Launchrock.com?

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Hello Arnold,

 

I have placed the script you shared in the body of the site. It's showing up properly in the html code, but am still not getting any data for the goal/event I want to track... Maybe that's because I haven't set the Goal/Event properly in Analytics?

 

Thanks again for your help!

Aure

How to implement and track Goal/Event for a site hosted on Launchrock.com?

Top Contributor
# 6
Top Contributor

Hi,

 

I can confirm that the event is being sent to GA when the form is submitted. Make sure you set your goal as Event Action Equal to "submit".

There is a delay in processing in GA, it may take a few hours for the data to appear in the reports. Let me know when you start getting data. Thanks.


Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

How to implement and track Goal/Event for a site hosted on Launchrock.com?

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭

Thanks Arnold -

 

Glad to hear now the event is sent to GA... but after checking, a new visitor cannot subscribe/submit his/her email address anymore (an error message pops up right after clicking "submit", asking to try again), which is quite counterproductive. (I did check and the email address is really not registered in the database).

 

I removed the code from the body for now, until, maybe, we figure out why this can be happening? Am sorry to be asking for so much help, but truly appreciate the support!

 

Aure

 

PS/ I have set the event action equal to "submit" in GA