Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories

Posting metric to google analytics from perl script

I am able to post analytics from my php scripts, but could not post analytics from perl script.

I solved my problem as follows. Created an utility php script and called that php script from my perl script. Then it worked.

    $ec = $_GET['ec'];
    $ea = $_GET['ea'];
    $el = $_GET['el'];
    $ev = $_GET['ev'];

    // Send event tracking as well.
    $url =
    $event_data = array(
            'v' => '1', 
            'tid' => 'UA-XXXXXX-Y', 
            'cid' => $_SERVER["REMOTE_ADDR"], 
            't' => 'event', 
            'ec' => $ec,
            'ea' => $ea,
            'el' => $el,
            'ev' => $ev);
    $event_options = array(
            'http' => array(
                'header'  => "Content-type:
                'method'  => 'POST',
                'content' =>
    $event_context  =
    $result = file_get_contents($url, false,

    echo "XXX";

Categories : Perl

Related to : Posting metric to google analytics from perl script
Google Mobile Analytics Event Tracking: Multiple properties to describe an event in google analytics
You can't store date from arbitrary JavaScript objects with Google Analytics events. Each event is limited to 4 properties: category, action, label and value. So it is possible to describe an event with multiple properties, but it's very constrained.

Categories : Misc
Action Script 3 - Posting a JSON to a RESTful server
If you're content type is application/json, then you don't want to use URLVariables for your data: //this is causing the problem because it's encoding your JSON string so it's url safe. var vars: URLVariables = new URLVariables(); = JSON.stringify(messages); Instead, assign the stringified JSON directly to the URLRequest's data property like in the following example: var urlRequest

Categories : Ajax
How do I add Google Analytics to a Meteor app?
There is a package available meteor add datariot:ganalytics that adds GA to Meteor. It allows the user to configure analytics and set GA events. Found here:

Categories : Javascript
Google analytics userID tracking
No. The user id feature is intended to recognize authenticated users across devices so it can generate cross-device reports. However Analytics will still deliver aggregated data only. If you create ids to recognize individual users you not only need to be careful not to violate Googles TOS (which forbid to user personal data or anything that can be used for people outside your company to identif

Categories : Javascript
Google Analytics Goals Regex
I do not understand your use case. If somebody calls the goal destination the goal is completed, so it is not possible to have the destination as a goal step in the first place. So there would be no point in excluding the destination url from the funnel (which, as pointed out in the comment, is not possible in any case). And frankly, funnel Visualisation sucks - skipped steps get backfilled, rep

Categories : Regex
Recently Add
SSL error calling Perl web service via https using LWP
SOAP::Lite always faults in debug mode
perl referencing a hash outside of the scope that populated it (histogram)
Perl script to print out all the lines containing a keyword and the line below it
PERL Unicode Escape string pass from command line argument wrong output
Perl process crashes after handling signal
Marpa: Can I explicitly disallow keywords as identifiers?
Perl: Import text, containing ÅÄÖ, from file
error using perl - Proc::ProcessTable. works in cmd line, not in .pl file
DBIx::Class chaining resultsets with same table in prefetch
Time as input, print timetable in Perl
compare values of different tables perl
Automatically increasing ID generation using PERL
Syntax Error, first line after dostuff
Delete files in a folder using Perl
Perl '-d' operator is not detecting a directory
Perl appending text to new line
write_timeout in IO::Socket::Timeout
Using ForkManager and Perl properly?
Is a cyclic dependency solved with require?
Posting metric to google analytics from perl script
How can I check if a user enters my page the first time?
Sorting arrays of intervals in perl?
Perl: How to get the link target of a soundcloud feed mp3
Uninitialized value in concatenation
Perl code - pipe "|" in `open()` statement
perl command line backticks with matrix
Perl OO - Creating a list of objects
extract gene-id + function annotation from .gff
How to receive parameters and values from POST method in Perl CGI?
© Copyright 2017 Publishing Limited. All rights reserved.