mautic / mautic-helper-chrome-extension

7 stars 9 forks source link

Gmail Email Tracking #10

Open skacco opened 2 years ago

skacco commented 2 years ago

Mautic Version

4.2.x series

PHP version

7.4

What browsers are you seeing the problem on?

Not relevant

What happened?

A bug happened! Email was everything mark as read because there is an error on code inside app/bundles/EmailBundle/Controller line:655 // stat doesn't exist, create one if (null === $stat) { $lead['email'] = $email; // needed for stat $stat = $this->addStat($lead, $email, $query, $idHash); }

        $stat->setSource('email.client');

NOTE at this point stat is created so it always enter in the condition below and hitEmail was fired

        if ($stat || 'Outlook' !== $integration) { // Outlook requests the tracking gif on send
            $model->hitEmail($idHash, $this->request); // add email event
        }

SOLUTION: if (null === $stat) { $lead['email'] = $email; // needed for stat $stat = $this->addStat($lead, $email, $query, $idHash); } else { $model->hitEmail($idHash, $this->request); // add email event }

How can we reproduce this issue?

Step 1: create an email with gmail tracking integration

Relevant log output

No response

Code of Conduct

--- Want to back this issue? **[Post a bounty on it!](https://app.bountysource.com/issues/109009301-gmail-email-tracking?utm_campaign=plugin&utm_content=tracker%2F46170183&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://app.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F46170183&utm_medium=issues&utm_source=github).
jos0405 commented 2 years ago

Hi, What do you mean by this:

"create an email with gmail tracking integration"

did you mean

Create an email and send to gmail? Or you wanted to use the Gmail Tracking plugin?

skacco commented 2 years ago

I am talking about using Gmail Tracking Plugin

RCheesley commented 2 years ago

@skacco are you talking about the Chrome extension? If so can you share a link to what you are using so we can get this issue to the right repo?