How can I integrate AdWords conversion with Contact form? - contao

I wan to integrate an AdWords conversion code in contao. The conversion shall be tracked when a contact form (that was created in the Backend) is sent successfully. I've to do that for a costumer of my organization and actually got no experiences with contao. I already generated the conversion code, I just don't know the "place" to paste it. Is there a template or sth. like that for each form?

there are different ways to achieve this in contao.
first you could copy the templates to to your /template folder and add the code
second, an much easier solution, you could create an html-module (in the layout section) an include it as a content element in the frontent (i would say on the page where's the form redirect)

Related

How can I capture URL parameters sent to a google form, and save them to the connected spreadsheet?

I have 2 scripts - one to fire on open trigger, and one to fire on save, I'm not sure which one would work best with function scope etc...
But basically, users are sent to the survey form using a public link, and additional info is added to that link in the form of parameters/queries, such as:
booking=123456
start-at=1429952400
item=1702
I'm trying to have the script save these parameters, or even the entire URL that was used to open the form, preferably on the same row as the survey response, but even if the user doesn't submit the form, I would still like to save the URL as a non-completed survey (hence the on-open and on-save triggers).
I looked into:
function doGet(e) {},
function URL(text) {},
function doPost(e) {},
even console.log(params); and console.log(e);
as well as others and I cannot seem to get access to the URL.
What gives? Should I just code this on my own server and run my own form? I would really like to figure out google scripting but it seems just too cumbersome at this point. Any help or solution would be highly appreciated.
To be clear, I don't think I can use a pre-filled url, because I don't know that parameter values ahead of time, and I don't think you can use hidden fields for pre-filled anyway.
From the question
What gives? Should I just code this on my own server and run my own form? I would really like to figure out google scripting but it seems just too cumbersome at this point. Any help or solution would be highly appreciated.
To be clear, I don't think I can use a pre-filled url, because I don't know that parameter values ahead of time, and I don't think you can use hidden fields for pre-filled anyway.
A prefilled-url could be used to set the answers to all the questions in a Google Form.
Please bear in mind that Google Forms doesn't support hidden questions in the sense of an HTML form does, the way that you could do this is by putting the question on a section that the form response flow never show it but on the prefill view all the sections are displayed.
Regarding using Google Apps Script to handle Google Forms a custom URL query string that is not supported, so if that is a deal-breaker, then you should use other options.
If you like so much Google Apps Script you could use it to create a web application as doGet pass the URL query string / parameters to the server side code and also you could grab them from the client-side code by using the HTML Service.

iOS: Create dynamic contracts with iOS

I want to create a native ios application where people have to sign different contracts. Each contract contains text and input fields such as drop down and textbox. Now each contract might have different number of input fields and these might be totally different.
Any input in the best way to solve this problem? It seems like a lot of work to dynamically generate UI in code and reformat the contracts in a way that can be rendered by ios? As I cant send the pdf or doc itself.
One solution may be you can have categories(sector-1,sector-2 etc) and related sample contract from. In those sample forms you can handle dynamic controls which definitely a few.

Labview to google spreadsheet information transfer

I have been using LabVIEW to collect measurement data, and I would like to know if it is possible for LabVIEW to communicate the results to a Google Spreadsheet. If so, where could I find resources to learn how to make LabVIEW transmit information to the Google Spreadsheet ?
Thanks!
EDIT AND FOLLOW-UP- I used Jonathan's suggestion below and experimented with the LabVIEW http Post.vi. It's very simple, all you need to do is enter the URL of the Google form (replacing the final "viewform" with "formResponse") and a string with the data you want to enter (with rough syntax = ). A big thanks for that answer, it was really helpful !
However, when I try to use this method for a Google form with more than one page, the data isn't read properly... The form is still sent but every field not present on the first page of the form remains blank on the Spreadsheet. I feel that this is somehow linked to the fact that in the Google form, the URL of all the pages after page 1 are the URL of page 1 with the final "viewform" replaced with "formResponse". Is this what is causing the error or is it something else altogether, and how can I fix it ?
I can think of two ways to do this:
You can create a form in google spreadsheets. The form appears as an html document with standard tags. From here, I would use labview's http functionality to submit data to that form using a POST request. This would be the easiest way to get data in there.
Using the Google Apps API, you can manipulate google spreadsheets and dump data in there directly. This is going to be more complicated in terms of development time, but more configurable in the long run. https://developers.google.com/google-apps/spreadsheets/#what_can_this_api_do There are .net and java code examples throughout the documentation, so it would take some work to port this to LabVIEW, but it could be done.

Graphs and ASP.Net MVC

I have a graph which I would like to represent using an image on a website. The problem is generating this image dynamically based on the current state of the graph.
I'm using ASP.Net MVC 3 with C#.
I've been thinking about generating the image on the harddisk using some tool(Graphviz etc.) and then passing the path of the file to the view.
Security isn't a real issue, as this is just internal project based work for now, it is much more important that its easy to implement.
I've been trying quickgraph, and eventually i've had it generating DOT files (apperently it ignores my attempts to make PNG's) but the code fails because the program don't have access to where the files are generated. I suppose this is easy to fix, though.
Do you have any suggestions to how I could do this (If i should do something completely different or how i can get the DOT files rendered as PNG)?
Best regards,
Daniel
Just wanted to note that I solved this using the Google Image Chart, they have experimental Graphviz support: http://code.google.com/apis/chart/image/docs/gallery/graphviz.html
Simply generate an URL and insert an external image on your page.
If the graph library allows you, write the result to a memory stream and place it in the Cache (System.Web.HttpRuntime.Cache) with a key.
Use that key to generate the img tag in the view and point to an action ('View'?) in a controller ('Image') like "/Image/View/392838".
Create this controller and view and serve the contents (make sure to include proper MIME type, content type etc.) from there.
In the cache specify a decent lifetime for the object, such as 15 seconds, sliding expiration.

Using Drupal to do what Digg Does

I'm trying to create a site where, like Digg, a user can submit a link and using ajax it attempts to pull the metadata from the page into a title and description field. The user can change either of these fields then submit the content.
Ideally a module already exists. I tried playing around with Feeds, but I'm not sure if I'm looking in the right place.
I probably have to create my own custom module.
Any suggestions? Can I tap into the Feeds API just to parse the url then take the results and do all the mapping myself? Assuming I want to create my own form and bring in my own ajax.
You could probably do that with Feeds, but I think it might be overkill and could be difficult to configure.
You could do what you're looking for in a relatively small custom module using hook_form_alter to customize the submission form, arg() to determine the URL being submitted, drupal_http_request to retrieve the page, then the Form API's #default_value setting to pre-populate the field(s).
The Prepopulate module does a lot of what you're looking for. If it provides hooks (I'm not sure if it does) all you would need to do is add the drupal_http_request, to handle fetching the metadata.
In Drupal it's called Drigg ;). It is supposed to a nice Drupal module to get the functionality of Digg. It will be worth a try I suppose.

Resources