I registered for an account, grabbed my ID and Key, got the dashboard to display within my Commerce site, but there is no data being collected. I thought we had finally found a great solution for tracking sales data and referrals; am I missing something here?

Comments

guguss’s picture

Status: Active » Postponed (maintainer needs more info)

Hi,

Can you try to update the module to the latest Dev version ?

It works fine on my install so I don't know what could go wrong on your site...

threadsniper’s picture

I installed the Dev version but still not getting any data. Let me make sure I am inputting the data correctly:

App ID = Organization ID

App token = Organization Token

Is this correct?

threadsniper’s picture

Okay, it seems the problem is in obtaining the proper application id and token. How is this done?

guguss’s picture

You can get your App ID and App token from the Commerce Guys Marketplace.

Simply fill in the form at the bottom of the page and process the checkout (no credit card required since it's a free subscription...).

guguss’s picture

@threadsniper: Does that answer your question ? Does the module work for you now ?

threadsniper’s picture

Apologies GuGuss, I've been trying to handle this through Jirafe support as well. They also pointed me in the direction of the Marketplace; I went through this process. Still, no data is being collected. I checked and re-checked all data to ensure it was correct. I am at a loss as to what is wrong here.

guguss’s picture

StatusFileSize
new49.14 KB

That's weird ! Are you working locally (it should work anyway) ?

There might be something wrong in the Jirafe configuration. Do you see that page (see the attached screenshot) when you go to admin/commerce/config/jirafe ?

threadsniper’s picture

Unfortunately I only see the Application ID & Token.

willieseabrook’s picture

I have the same issue. Against both 7.x-1.0-beta1 and 7.x HEAD.

At /admin/commerce/config/jirafe I see fields only for: "Application ID" and "Application Token"

The site configuration fields never appear. This is because of the following logic in jirafe.admin.inc:

  if (!empty($config['sites'])) {
    $form['site_info'] = array(
      '#title' => t('Site information'),
      '#type' => 'fieldset',
    );
    foreach($config['sites'] as $site) {
      $form['site_info'][$site['site_id']] = array(
        '#title' => $site['description'],
        '#type' => 'fieldset',
      );

After install, $config['sites'] is always empty, so the config form is never shown.

I found a function "jirafe_synchronize" that appears to be intended to pull data from the api to fill up the sites array. But jirafe_synchronize is never called anywhere - not in a cron hook or in install. I tried a drush php-eval "jirafe_synchronize();" to force it, but the API returned a 403 denied error.

Thus, the reason the tracking javascript (jirafe variable) is never added to the page is because jirafe_get_current_site() will always return null, and it just returns.

i tried to cheat, by first figuring out the variable structure and then hardcoding it into settings.php

$conf['jirafe_config']['app_id'] = 'MYAPPID';
$conf['jirafe_config']['token'] = 'MYTOKEN';
$conf['jirafe_config']['sites'][0] = array(
  'description' => 'MY SITE NAME',
  'site_id' => MYSITEID,
  'url' => 'MY LIVE URL WITH HTTPS PREFIX'
);

then using jirafe_current_site_alter to force its use on local devel.

function mymodule_jirafe_current_site_alter(&$current_site, &$config) {
  // Always my site, even on devel - just for testing
  $current_site = $config['sites'][0];
}

After doing all this, I confirmed that jirafe is being added by inspecting the jirafe var in firefbug console.

Nonethless, data is still not appearing in my Jirafe dashboad.

Hope this info helps. I'd try and patch this to help but I've only been a Jiraffe user for 30 minutes and have no idea of intentions or anything - e.g is jirafe_synchronize supposed to be called, or is that some kind of legacy function. I also checked Confluence and couldn't find any info about how the API is intended to be used.

willieseabrook’s picture

Status: Postponed (maintainer needs more info) » Active
haza’s picture

Status: Active » Needs review
StatusFileSize
new1.45 KB

Attached a patch that force the synchronize to be done when we submit the admin form. So it should correctly populate the jirafe_config variable with the data that belongs to the users and sites.

theo_’s picture

Commit from #11 fixed the bug for me.

Sites & users part of jirafe_config variable are correctly populated now when saving jirafe's configuration.

haza’s picture

Add a condition in the update that prevent the sync to do be done if the data are already there.

haza’s picture

Tweaked our synchronize code. If some "user ID" and "site ID" were already existing, the old sync function never take care of using them to call jirafe API sync() method. That means jirafe will create a new "site ID" and "user ID", deleting the existing one.

Patch fix that.

guguss’s picture

Thanks Haza !

Patch #14 committed here

guguss’s picture

Status: Needs review » Fixed
jsacksick’s picture

Version: 7.x-1.0-beta1 » 7.x-1.0-beta3
Status: Fixed » Active

jirafe_synchronize is called without catching the potentially exception thrown when the app_id and the token are not configured.

jsacksick’s picture

Status: Active » Needs review
StatusFileSize
new1.84 KB

The attached patch fixes the issue

haza’s picture

Status: Needs review » Reviewed & tested by the community

Seems good !

jsacksick’s picture

Status: Reviewed & tested by the community » Fixed
threadsniper’s picture

I am possibly extremely unlucky. Have updated to the latest iteration of the module (beta4) and still I get absolutely no data.

brephraim’s picture

Confirmed. Still only seeing Application ID/Token on the configuration page as well.

Tried both patches, nothing. Tried the beta4, nothing.

brephraim’s picture

Version: 7.x-1.0-beta3 » 7.x-1.x-dev
Category: support » bug
Status: Fixed » Active
andor.koza’s picture

I am unlucky too.
I inspected the code a little bit. And as I see after we add the appID and appToken than after submit the module sync the data and get the sites & user information.
so, I think there is a problem, because I do not get back any site or user data.
I also checked my Jirafe account, but I do not see anything wrong.

I'am using drupal 7.17 and commerce 1.4 (but I think at this part these infos are irrelevant)

Anybody solved the problem?

andor.koza’s picture

I think I solved the my problem, may be it will help out somebody too.
So when I created a Jirafe account at www.jirafe.com than it simply not works, if you create account at http://marketplace.commerceguys.com/ than it works.

For me it solved the collecting data issue.

haza’s picture

We saw that today, we are investigating why, with jirafe's team.

guguss’s picture

Status: Active » Fixed

The dashboard can't collect any data if the registration happened on Jirafe website... Please only subscribe from the Marketplace !

There is a "free" subscription where you don't have to pay to test the dashboard.

threadsniper’s picture

Unfortunately, this happens in either case. I have subscribed via Jirafe's site, and done it through the marketplace, in both cases the site collects no data.

threadsniper’s picture

Status: Fixed » Active

Any traction on this continued issue?

jsacksick’s picture

Status: Active » Fixed

@threadsniper, are you using your credentials (App ID, token) on multiple websites (or environments) ? If you do so this can cause issues :
(From the jirafe api documentation)

Sync is a synchronization api call, which updates inserts or removes all given or missing users, sites.
If there was an user or site created before, it must be included in this call in order to update, maintain it. If it is not included and it exists
in jirafe database - it will be removed, otherwise if it does not exist - will be created.
Be careful with custom or manual sync API calls unless you are sure about the outcomes.
Sync call is mainly used in jirafe plugins for simple and effective data updates and is not recommended for manual use cases.

If it's not the case, then check your drupal logs by going to (admin/reports/dblog) and check if you have curl errors (Jirafe is using it for making requests to the API), this could explain why and you'll probably have to adjust your environment settings.

Warning: curl_setopt_array() [function.curl-setopt-array]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in Jirafe_HttpConnection_Curl->makeCurlRequest()
guguss’s picture

threadsniper’s picture

jsacksick -- I assumed that having the connection active on multiple sites (like our testing and staging environments, for instance) would cause an undesirable disparity in the data being collected, so I've had the module either disabled or not installed on those other sites since implementing it on our live site. Also, there are no curl issues either. I cannot seem to correct this issue.

threadsniper’s picture

Strangely, I decided to sign up on the Marketplace again and grab another token and app id, and now Jirafe is working as advertised. The only question is, however, where do we take it from here, as we want to pay for a higher service level to have access to more features, and the token and id from the jirafe site dont' seem to work for Drupal Commerce.

luksak’s picture

Component: Miscellaneous » Code
Status: Fixed » Active

I solved the issue with this patch:

http://drupal.org/node/1859946#comment-6826348

But this module really lacks documentation. I created a issue for this: #1862304: Missing documentation on setup

luksak’s picture

Component: Code » Miscellaneous
Status: Active » Fixed

Didn't mean to change the status...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.