<PAGE>

                                                                   EXHIBIT 10.4

                                VOTING AGREEMENT

                  VOTING AGREEMENT, dated as of July 1, 2001 (this "Agreement"),
by and between ValueClick, Inc., a Delaware corporation (the "Parent"), and
Pequot Offshore Private Equity Fund, Inc. ("Stockholder"), a stockholder of
Mediaplex, Inc., a Delaware corporation (the "Company").

                                    RECITALS

                  A. Concurrently with the execution of this Agreement, Parent,
the Company and others are entering into an Agreement and Plan of Merger (the
"Merger Agreement"), pursuant to which Parent and the Company will effect a
business combination, upon the terms and subject to the conditions set forth in
the Merger Agreement (the "Merger"). Unless otherwise indicated, capitalized
terms not defined herein have the meanings given to them in the Merger
Agreement.

                  B. The Stockholder is a stockholder of the Company and, as of
the date hereof, has the voting power with respect to such number of shares of
the outstanding capital stock of Company as is indicated on the final page of
this Agreement (collectively, the "Shares").

                  C. As a material inducement to enter into the Merger Agreement
and to consummate the Merger, Parent desires the Stockholder to agree, and the
Stockholder is willing to agree to vote the Shares and any other such shares of
capital stock of acquired by Stockholder so as to facilitate consummation of the
Merger.

                  NOW, THEREFORE, intending to be legally bound, the parties
agree as follows:

1.       VOTING OF SHARES.

         Section 1.1 Voting Agreement. Subject to the terms and conditions of
this Agreement, at every meeting of the stockholders of the Company called with
respect to any of the following, and at every adjournment or postponement
thereof, and on every action or approval by written consent of the stockholders
of the Company with respect to any of the following, Stockholder shall vote or
cause to be voted the Shares (to the extent still owned) and any New Shares (as
defined below) (a) in favor of (i) adoption of the Merger Agreement, (ii)
waiving any notice that may have been or may be required relating thereto and
(iii) any matter that could reasonably be expected to facilitate the Merger and
(b) against any matter that could reasonably be expected to hinder, impede,
prevent or delay the consummation of the Merger. Stockholder shall not, from the
date of this Agreement until the Expiration Date (as hereinafter defined), enter
into any agreement or understanding with any Person to vote or give instructions
inconsistent with clause "(a)" or "(b)" of the preceding sentence.

         Section 1.2 NEW SHARES. Stockholder agrees that any shares of capital
stock of the Company that Stockholder purchases or with respect to which
Stockholder otherwise acquires beneficial ownership ("New Shares") after the
execution of this Agreement and prior to the Expiration Date (as defined below)
shall be subject to the terms and conditions of this Agreement to the same
extent as if they constituted Shares.

<PAGE>

         Section 1.3 PROXY.

         (a) Concurrently with the execution of this Agreement, Stockholder
shall deliver to Parent a proxy in the form attached hereto as EXHIBIT A, which
shall be irrevocable to the fullest extent permitted by law, with respect to the
shares referred to therein (the "Proxy").

         (b) After the execution of this Agreement until the Expiration Date (as
defined below), Stockholder shall execute or cause to be executed such further
proxies, each in substantially the form attached hereto as EXHIBIT A, as may be
requested by Parent with respect to any New Shares, and Stockholder shall
promptly notify Parent upon acquiring beneficial ownership of any New Shares.

2.       TRANSFER OF SHARES.

         Section 2.1 TRANSFER OF VOTING RIGHTS. Stockholder covenants and agrees
that, from the date of this Agreement until the Expiration Date (as defined
below), Stockholder will not deposit any of the Shares into a voting trust or
grant a proxy or enter into a voting agreement or similar contract with respect
to any of the Shares.

         Section 2.2 NO LIMITATION ON TRANSFER OF SHARES. Notwithstanding any
other provision in this Agreement, the Company acknowledges that this Agreement
does not restrict Stockholder from transferring, selling or otherwise disposing
of its Shares.

3.       WAIVER OF APPRAISAL RIGHTS. Stockholder hereby irrevocably and
unconditionally waives any rights of appraisal, dissenters' rights or similar
rights that Stockholder may have in connection with the Merger.

4.       REPRESENTATIONS AND WARRANTIES OF THE STOCKHOLDER.

         Section 4.1 OWNERSHIP OF SHARES. Stockholder represents and warrants
that Stockholder (a) is the record or beneficial owner of and has the sole right
to vote or direct the voting of the Shares, which at the date hereof are free
and clear of any liens, claims, options, charges or other encumbrances and (b)
does not own, either beneficially or of record, any shares of capital stock of
the Company other than the Shares (excluding (i) shares as to which Stockholder
currently disclaims beneficial ownership in accordance with applicable law and
(ii) shares which Stockholder has the right to acquire pursuant to options
granted to Stockholder by the Company).

         Section 4.2 NO CONFLICT. The execution and delivery of this Agreement
and the Proxy by Stockholder do not, and the performance of this Agreement and
the Proxy by Stockholder will not: (a) conflict with or violate any legal
requirement, order, decree or judgment applicable to Stockholder or by which
Stockholder or any of Stockholder's properties is bound or affected; or (b)
result in any breach of or constitute a default (with notice or lapse of time,
or both) under, or give to others any rights of termination, amendment,
acceleration or cancellation of, or result in the creation of an encumbrance on
or otherwise affecting any of the Shares pursuant to, any contract to which
Stockholder is a party or by which Stockholder or any of Stockholder's
properties is bound or affected. The execution and delivery of this Agreement
and the Proxy by Stockholder do not, and the performance of his obligations
under this Agreement and the granting of the Proxy by Stockholder will not,
require any consent of any Person.


                                       2
<PAGE>

         Section 4.3 ENFORCEABILITY. Stockholder has all requisite power and
capacity to execute and deliver this Agreement and the Proxy and to perform his
obligations hereunder and thereunder. This Agreement and the Proxy have been
duly executed and delivered by Stockholder and, assuming the due authorization,
execution and delivery of this Agreement by Parent, each constitute the legal,
valid and binding obligations of Stockholder, enforceable against Stockholder in
accordance with their respective terms, subject to (a) laws of general
application relating to bankruptcy, insolvency and the relief of debtors, and
(b) rules of law governing specific performance, injunctive relief and other
equitable remedies.

         Section 4.4 CONTINUOUS WARRANTY. The representations and warranties
contained in this Agreement are accurate in all respects as of the date of this
Agreement.

5.       COVENANTS OF STOCKHOLDER. Stockholder hereby covenants and agrees to
cooperate fully with Parent and to execute and deliver any additional documents
necessary or desirable and to take such further actions, in the reasonable
opinion of Parent (subject to Section 2.2 with respect to Stockholder's ability
to transfer its Shares at any time), necessary or desirable to carry out the
intent of this Agreement.

6.       TERMINATION. This Agreement shall terminate and shall have no further
force or effect on the earliest of (i) the termination of the Merger Agreement
in accordance with its terms, (ii) the Effective Time and (iii) November 30,
2001 (the "Expiration Date").

7.       NO RESTRAINT ON OFFICER OR DIRECTOR ACTION. This Agreement is intended
to bind Stockholder solely in its capacity as a stockholder of the Company and
only with respect to the specific matters set forth herein, and shall not
prohibit any employee of Stockholder from acting in accordance with his
fiduciary duties as an officer or director of the Company, if applicable.

8.       LIMITED PROXY. Stockholder will retain at all times the right to vote
Stockholder's Shares (except in the event Stockholder transfers, sells or
disposes its Shares), in Stockholder's sole discretion, on all matters other
than those set forth in Section 1.1 which are at any time or from time to time
presented to the Company's stockholders generally.

9.       MISCELLANEOUS.

         Section 9.1 FEES AND EXPENSES. Except as specifically provided to the
contrary in this Agreement, all costs and expenses incurred in connection with
this Agreement shall be paid by the party incurring such expenses.

         Section 9.2 AMENDMENTS AND MODIFICATION. Subject to applicable law,
this Agreement may not be amended, modified, or supplemented except upon the
execution and delivery of a written agreement executed by the parties hereto.

         Section 9.3 NONSURVIVAL OF REPRESENTATIONS AND WARRANTIES. None of the
representations and warranties in this Agreement or in any schedule, instrument
or other document delivered pursuant to this Agreement shall survive the
Expiration Date; PROVIDED, HOWEVER that the termination of this Agreement shall
not relieve any party from any liability for any breach of this Agreement.


                                       3
<PAGE>

         Section 9.4 NOTICES. All notices and other communications hereunder
shall be in writing and shall be deemed given if delivered personally,
telecopied (which is confirmed) or sent by an internationally recognized
overnight courier service, such as Federal Express, to the parties at the
following addresses (or at such other address for a party as shall be specified
by like notice):

                     if to Parent to:

                     ValueClick, Inc.
                     4360 Park Terrace Drive, Suite 100
                     Westlake Village, California 91361
                     Attention: Jim Zarley
                     Telecopy No.: (818) 575-4508


                     with a copy (which shall not constitute notice) to:

                     Brobeck, Phleger & Harrison LLP
                     550 South Hope Street
                     Los Angeles, California 90071
                     Attention: Kenneth R. Bender
                     Telecopy No.: (213) 745-3345

                     and

                     if to Stockholder, to the address for notice set forth on
                     the last page hereof.

                     with a copy (which shall not constitute notice) to:

                     Wilson Sonsini Goodrich & Rosati
                     One Market, Spear Tower
                     San Francisco, California 94105
                     Attention: Michael J. Kennedy
                     Telecopy No.: (415) 947-2099

         Section 9.5 COUNTERPARTS. This Agreement may be executed in one or more
counterparts (whether delivered by facsimile or otherwise), each of which shall
be considered one and the same agreement.

         Section 9.6 ENTIRE AGREEMENT; NO THIRD PARTY BENEFICIARIES. This
Agreement (including the documents and the instruments referred to herein): (a)
constitute the entire agreement and supersede all prior agreements,
negotiations, arrangements and understandings, both written and oral, among the
parties with respect to the subject matter hereof, and (b) are not intended to
confer upon any person other than Parent and Stockholder any rights or remedies
hereunder.

         Section 9.7 SEVERABILITY. Any term or provision of this Agreement that
is held by a court of competent jurisdiction or other authority to be invalid,
void or unenforceable in any situation in any jurisdiction shall not affect the
validity or enforceability of the remaining terms and provisions


                                       4
<PAGE>

hereof or the validity or enforceability of the invalid, void or unenforceable
term or provision in any other situation or in any other jurisdiction. If the
final judgment of a court of competent jurisdiction or other authority declares
that any term or provision hereof is invalid, void or unenforceable, the parties
agree that the court making such determination shall have the power to and
shall, subject to the discretion of such court, reduce the scope, duration, area
or applicability of the term or provision, to delete specific words or phrases,
or to replace any invalid, void or unenforceable term or provision with a term
or provision that is valid and enforceable and that comes closest to expressing
the intention of the invalid or unenforceable term or provision.

         Section 9.8 GOVERNING LAW. This Agreement shall be governed by and
construed in accordance with the laws of the State of Delaware without
application of conflicts of laws principles.

         Section 9.9 ENFORCEMENT. The parties agree that irreparable damage
would occur in the event that any of the provisions of this Agreement were not
performed in accordance with their specific terms or were otherwise breached. It
is accordingly agreed that the parties shall be entitled to an injunction or
injunctions to prevent breaches of this Agreement and to enforce specifically
the terms and provisions of this Agreement in any court of the United States
sitting in Delaware or the state of Delaware, this being in addition to any
other remedy to which they are entitled at law or in equity. PARENT AND
STOCKHOLDER EACH IRREVOCABLY AND UNCONDITIONALLY WAIVE ANY RIGHT THEY MAY HAVE
TO TRIAL BY JURY IN CONNECTION WITH THIS AGREEMENT, THE PROXY OR THE
TRANSACTIONS CONTEMPLATED HEREBY OR THEREBY.

         Section 9.10 EXTENSION, WAIVER. At any time prior to the Expiration
Date, the parties to this Agreement may (a) extend the time for the performance
of any of the obligations or other acts of the other parties to this Agreement,
(b) waive any inaccuracies in the representations and warranties of the other
parties contained in this Agreement or in any document delivered pursuant to
this Agreement or (c) waive compliance by the other parties with any of the
agreements or conditions contained in this Agreement. Any agreement on the part
of a party to any such extension or waiver shall be valid only if set forth in
an instrument in writing signed on behalf of such party. The failure of any
party to this Agreement to assert any of its rights under this Agreement or
otherwise shall not constitute a waiver of those rights.

         Section 9.11 ASSIGNMENT. Neither this Agreement nor any of the rights,
interests or obligations hereunder shall be assigned by any of the parties to
this Agreement (whether by operation of law or otherwise) without the prior
written consent of the other parties to this Agreement. Subject to the preceding
sentence, this Agreement will be binding upon, inure to the benefit of and be
enforceable by the parties and their respective successors and assigns. Without
limiting any of the restrictions set forth in Section 2 or elsewhere in this
Agreement, this Agreement shall be binding upon any person to whom any Shares
are transferred.

         Sectino 9.12 LEGAL COUNSEL. Stockholder acknowledges that he has been
advised to, and has had the opportunity to consult with his or its personal
attorney prior to entering into this Agreement. Stockholder acknowledges that
attorneys for the Company represent the Company and do not represent any of the
stockholders of the Company in connection with the Merger Agreement, this
Agreement or any of the transactions contemplated hereby or thereby.


                                       5
<PAGE>

         Section 9.13 AGREEMENT NEGOTIATED. The form of this Agreement has been
negotiated by or on behalf of Parent and the Company, each of which was
represented by attorneys who have carefully negotiated the provisions hereof. No
law or rule relating to the construction or interpretation of contracts against
the drafter of any particular clause should be applied with respect to this
Agreement or the Proxy.

         Section 9.14 EFFECT OF HEADINGS. The Section headings herein are for
convenience only and shall not affect the construction or interpretation of this
Agreement.

         Section 9.15 LEGENDS. Any stock certificates representing the Shares or
the New Shares shall be legended at the request of Parent to reflect the voting
agreement and, if applicable, the irrevocable proxy granted by this Agreement.


                                       6
<PAGE>

         IN WITNESS WHEREOF, the parties have caused this Agreement to be duly
executed on the date and year first above written.

         VALUECLICK, INC.

         By:       /s/ Samuel Paisley
                   ------------------------
         Name:     Samuel Paisley
         Title:    Chief Operating Officer

         STOCKHOLDER
         PEQUOT OFFSHORE PRIVATE EQUITY FUND, INC.

         By:       Pequot Capital Management
                   as Investment Advisor

                   By:       /s/ Arthur J. Samberg
                             -------------------------
                   Name:     Arthur J. Samberg
                   Title:    Chairman and CEO

         Number of Shares of Mediaplex, Inc. Beneficially Owned by Stockholder:

         Common Stock: 187,825
                       -------


                                       7
<PAGE>

                                    EXHIBIT A

                                IRREVOCABLE PROXY

                  The undersigned stockholder of Mediaplex, Inc., a Delaware
corporation (the "Company"), hereby irrevocably appoints and constitutes
Samuel Paisley, of ValueClick, Inc., a Delaware corporation ("Parent"), and
each of them, or any other designee of Parent, as the sole and exclusive
attorneys and proxies of the undersigned, with full power of substitution and
resubstitution, to the full extent of the undersigned's rights with respect
to the shares of capital stock of the Company beneficially owned by the
undersigned, which shares are listed on the final page of this irrevocable
proxy (the "Irrevocable Proxy") and any and all other shares or securities
issued or issuable in respect thereof (collectively, the "Shares"), until the
earliest to occur of (i) the termination of the Merger Agreement (as defined
below) in accordance with its terms, (ii) the Effective Time and (iii)
November 30, 2001 (the "Expiration Date"). Upon the undersigned's execution
of this Irrevocable Proxy, any and all prior proxies given by the undersigned
with respect to any Shares are hereby revoked and the undersigned agrees not
to grant any subsequent proxies with respect to the Shares until after the
Expiration Date.

                  This Irrevocable Proxy is irrevocable (to the fullest extent
provided by applicable law), is coupled with an interest, is granted pursuant to
the Voting Agreement, dated as of July 1, 2001, by and between Parent and the
undersigned Stockholder (the "Voting Agreement"), and is granted in
consideration of the Parent (a) entering into the Agreement and Plan of Merger,
dated as of June , 2001 (the "Merger Agreement"), by and among Parent, the
Company and others and (b) consummating the Merger. Capitalized terms used but
not otherwise defined in this proxy have the meanings given to such terms in the
Merger Agreement.

                  The attorneys and proxies named above, and each of them, are
hereby authorized and empowered to by the undersigned at any time prior to the
Expiration Date to act as the undersigned's attorney and proxy to vote the
Shares and to exercise all voting and other rights of the undersigned with
respect to the Shares (including, without limitation, the power to execute and
deliver written consents with respect to the Shares pursuant to the General
Corporation Law of the State of Delaware) at every annual, special or adjourned
meeting of the stockholders of the Company, and in every written consent in lieu
of such a meeting, or otherwise, (a) in favor of (i) adoption of the Merger
Agreement, (ii) waiving any notice that may have been or may be required
relating thereto and (iii) any matter that could reasonably be expected to
facilitate the Merger and (b) against any matter that could reasonably be
expected to hinder, impede, prevent or delay the consummation of the Merger;
PROVIDED, HOWEVER, that Stockholder may transfer, sell or otherwise dispose of
its Shares at any time and the attorneys and proxies named above may not take
any actions to impair Stockholder's ability to transfer, sell or otherwise
dispose of such Shares.

                  The attorneys and proxies named above may not exercise this
Irrevocable Proxy on any other matter except as provided above. The undersigned
Stockholder may vote the Shares on all such other matters.


                                       8
<PAGE>

                  All authority herein conferred shall survive the death or
incapacity of the undersigned and any obligation of the undersigned hereunder
shall be binding upon the heirs, personal representatives, successors and
assigns of the undersigned. THIS PROXY IS IRREVOCABLE.


        Signature of Stockholder:   /s/ Arthur J. Samberg
                                    -------------------------
        Print Name of Stockholder:  Arthur J. Samberg
                                    Chairman & CEO
                                    Pequot Offshore Private Equity Fund, Inc.

                                    By:  Pequot Capital Management, Inc.
                                         as Investment Advisor


   187,825 Shares beneficially owned

                                       9